Class: LaunchDarkly::Impl::Integrations::Redis::RedisFeatureStore Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Integrations::Redis::RedisFeatureStore
- Includes:
- LaunchDarkly::Interfaces::FeatureStore
- Defined in:
- lib/ldclient-rb/impl/integrations/redis_impl.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
An implementation of the LaunchDarkly client's feature store that uses a Redis instance. This object holds feature flags and related data received from the streaming API. Feature data can also be further cached in memory to reduce overhead of calls to Redis.
To use this class, you must first have the redis and connection-pool gems
installed. Then, create an instance and store it in the feature_store property
of your client configuration.
Class Method Summary collapse
-
.default_prefix ⇒ Object
private
Default value for the
prefixconstructor parameter. -
.default_redis_url ⇒ Object
private
Default value for the
redis_urlconstructor parameter; points to an instance of Redis running atlocalhostwith its default port.
Instance Method Summary collapse
- #all(kind) ⇒ Object private
- #available? ⇒ Boolean private
- #delete(kind, key, version) ⇒ Object private
- #get(kind, key) ⇒ Object private
- #init(all_data) ⇒ Object private
-
#initialize(opts = {}) ⇒ RedisFeatureStore
constructor
private
Constructor for a RedisFeatureStore instance.
- #initialized? ⇒ Boolean private
- #monitoring_enabled? ⇒ Boolean private
- #stop ⇒ Object private
- #upsert(kind, item) ⇒ Object private
Constructor Details
#initialize(opts = {}) ⇒ RedisFeatureStore
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Constructor for a RedisFeatureStore instance.
41 42 43 44 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 41 def initialize(opts = {}) core = RedisFeatureStoreCore.new(opts) @wrapper = LaunchDarkly::Integrations::Util::CachingStoreWrapper.new(core, opts) end |
Class Method Details
.default_prefix ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Default value for the prefix constructor parameter.
65 66 67 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 65 def self.default_prefix LaunchDarkly::Integrations::Redis::default_prefix end |
.default_redis_url ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Default value for the redis_url constructor parameter; points to an instance of Redis
running at localhost with its default port.
58 59 60 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 58 def self.default_redis_url LaunchDarkly::Integrations::Redis::default_redis_url end |
Instance Method Details
#all(kind) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
73 74 75 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 73 def all(kind) @wrapper.all(kind) end |
#available? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 50 def available? @wrapper.available? end |
#delete(kind, key, version) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
77 78 79 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 77 def delete(kind, key, version) @wrapper.delete(kind, key, version) end |
#get(kind, key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 69 def get(kind, key) @wrapper.get(kind, key) end |
#init(all_data) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
81 82 83 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 81 def init(all_data) @wrapper.init(all_data) end |
#initialized? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
89 90 91 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 89 def initialized? @wrapper.initialized? end |
#monitoring_enabled? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 46 def monitoring_enabled? true end |
#stop ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
93 94 95 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 93 def stop @wrapper.stop end |
#upsert(kind, item) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
85 86 87 |
# File 'lib/ldclient-rb/impl/integrations/redis_impl.rb', line 85 def upsert(kind, item) @wrapper.upsert(kind, item) end |