Class: LaunchDarkly::Impl::DataStore::StatusProvider
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataStore::StatusProvider
- Defined in:
- lib/ldclient-rb/impl/data_store.rb
Overview
Instance Method Summary collapse
- #add_listener(listener) ⇒ Object
-
#initialize(store, update_sink) ⇒ StatusProvider
constructor
A new instance of StatusProvider.
- #monitoring_enabled? ⇒ Boolean
- #remove_listener(listener) ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(store, update_sink) ⇒ StatusProvider
Returns a new instance of StatusProvider.
60 61 62 63 64 65 |
# File 'lib/ldclient-rb/impl/data_store.rb', line 60 def initialize(store, update_sink) # @type [LaunchDarkly::Impl::FeatureStoreClientWrapper] @store = store # @type [UpdateSink] @update_sink = update_sink end |
Instance Method Details
#add_listener(listener) ⇒ Object
75 76 77 |
# File 'lib/ldclient-rb/impl/data_store.rb', line 75 def add_listener(listener) @update_sink.broadcaster.add_listener(listener) end |
#monitoring_enabled? ⇒ Boolean
71 72 73 |
# File 'lib/ldclient-rb/impl/data_store.rb', line 71 def monitoring_enabled? @store.monitoring_enabled? end |
#remove_listener(listener) ⇒ Object
79 80 81 |
# File 'lib/ldclient-rb/impl/data_store.rb', line 79 def remove_listener(listener) @update_sink.broadcaster.remove_listener(listener) end |
#status ⇒ Object
67 68 69 |
# File 'lib/ldclient-rb/impl/data_store.rb', line 67 def status @update_sink.last_status.get end |