Module: LaunchDarkly::Interfaces::DataSource
- Defined in:
- lib/ldclient-rb/interfaces.rb
Overview
Mixin that defines the required methods of a data source implementation. This is the component that delivers feature flag data from LaunchDarkly to the LDClient by putting the data in the FeatureStore. It is expected to run concurrently on its own thread.
The client has its own standard implementation, which uses either a streaming connection or polling depending on your configuration. Normally you will not need to use another one except for testing purposes. Two such test fixtures are LaunchDarkly::Integrations::FileData and LaunchDarkly::Integrations::TestData.
Instance Method Summary collapse
-
#initialized? ⇒ Boolean
Checks whether the data source has finished initializing.
-
#start ⇒ Concurrent::Event
Puts the data source into an active state.
-
#stop ⇒ Object
Puts the data source into an inactive state and releases all of its resources.
Instance Method Details
#initialized? ⇒ Boolean
Checks whether the data source has finished initializing. Initialization is considered done once it has received one complete data set from LaunchDarkly.
134 135 |
# File 'lib/ldclient-rb/interfaces.rb', line 134 def initialized? end |
#start ⇒ Concurrent::Event
Puts the data source into an active state. Normally this means it will make its first connection attempt to LaunchDarkly. If ‘start` has already been called, calling it again should simply return the same value as the first call.
144 145 |
# File 'lib/ldclient-rb/interfaces.rb', line 144 def start end |
#stop ⇒ Object
Puts the data source into an inactive state and releases all of its resources. This state should be considered permanent (‘start` does not have to work after `stop`).
151 152 |
# File 'lib/ldclient-rb/interfaces.rb', line 151 def stop end |