Module: LaunchDarkly::Integrations::Redis
- Defined in:
- lib/ldclient-rb/integrations.rb,
lib/ldclient-rb/integrations/redis.rb
Overview
Integration with [Redis](redis.io/).
Note that in order to use this integration, you must first install the ‘redis` and `connection-pool` gems.
Class Method Summary collapse
-
.default_prefix ⇒ String
Default value for the ‘prefix` option for Redis.new_feature_store.
-
.default_redis_url ⇒ String
Default value for the ‘redis_url` option for Redis.new_feature_store.
-
.new_feature_store(opts) ⇒ LaunchDarkly::Interfaces::FeatureStore
Creates a Redis-backed persistent feature store.
Class Method Details
.default_prefix ⇒ String
Default value for the ‘prefix` option for new_feature_store.
21 22 23 |
# File 'lib/ldclient-rb/integrations/redis.rb', line 21 def self.default_prefix 'launchdarkly' end |
.default_redis_url ⇒ String
Default value for the ‘redis_url` option for new_feature_store. This points to an instance of Redis running at `localhost` with its default port.
12 13 14 |
# File 'lib/ldclient-rb/integrations/redis.rb', line 12 def self.default_redis_url 'redis://localhost:6379/0' end |
.new_feature_store(opts) ⇒ LaunchDarkly::Interfaces::FeatureStore
Creates a Redis-backed persistent feature store. For more details about how and why you can use a persistent feature store, see the [SDK reference guide](docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
To use this method, you must first have the ‘redis` and `connection-pool` gems installed. Then, put the object returned by this method into the `feature_store` property of your client configuration.
53 54 55 |
# File 'lib/ldclient-rb/integrations/redis.rb', line 53 def self.new_feature_store(opts) return RedisFeatureStore.new(opts) end |