Class: LaunchDarkly::DataSystem::ConfigBuilder
- Inherits:
-
Object
- Object
- LaunchDarkly::DataSystem::ConfigBuilder
- Defined in:
- lib/ldclient-rb/data_system.rb
Overview
Builder for the data system configuration.
Instance Method Summary collapse
-
#build ⇒ DataSystemConfig
Builds the data system configuration.
-
#data_store(data_store, store_mode) ⇒ ConfigBuilder
Sets the data store configuration for the data system.
-
#fdv1_compatible_synchronizer(fallback) ⇒ ConfigBuilder
Configures the SDK with a fallback synchronizer that is compatible with the Flag Delivery v1 API.
-
#initialize ⇒ ConfigBuilder
constructor
A new instance of ConfigBuilder.
-
#initializers(initializers) ⇒ ConfigBuilder
Sets the initializers for the data system.
-
#synchronizers(synchronizers) ⇒ ConfigBuilder
Sets the synchronizers for the data system.
Constructor Details
#initialize ⇒ ConfigBuilder
Returns a new instance of ConfigBuilder.
19 20 21 22 23 24 25 |
# File 'lib/ldclient-rb/data_system.rb', line 19 def initialize @initializers = nil @synchronizers = nil @fdv1_fallback_synchronizer = nil @data_store_mode = LaunchDarkly::Interfaces::DataSystem::DataStoreMode::READ_ONLY @data_store = nil end |
Instance Method Details
#build ⇒ DataSystemConfig
Builds the data system configuration.
81 82 83 84 85 86 87 88 89 |
# File 'lib/ldclient-rb/data_system.rb', line 81 def build DataSystemConfig.new( initializers: @initializers, synchronizers: @synchronizers, data_store_mode: @data_store_mode, data_store: @data_store, fdv1_fallback_synchronizer: @fdv1_fallback_synchronizer ) end |
#data_store(data_store, store_mode) ⇒ ConfigBuilder
Sets the data store configuration for the data system.
70 71 72 73 74 |
# File 'lib/ldclient-rb/data_system.rb', line 70 def data_store(data_store, store_mode) @data_store = data_store @data_store_mode = store_mode self end |
#fdv1_compatible_synchronizer(fallback) ⇒ ConfigBuilder
Configures the SDK with a fallback synchronizer that is compatible with the Flag Delivery v1 API.
58 59 60 61 |
# File 'lib/ldclient-rb/data_system.rb', line 58 def fdv1_compatible_synchronizer(fallback) @fdv1_fallback_synchronizer = fallback self end |
#initializers(initializers) ⇒ ConfigBuilder
Sets the initializers for the data system.
34 35 36 37 |
# File 'lib/ldclient-rb/data_system.rb', line 34 def initializers(initializers) @initializers = initializers self end |
#synchronizers(synchronizers) ⇒ ConfigBuilder
Sets the synchronizers for the data system.
46 47 48 49 |
# File 'lib/ldclient-rb/data_system.rb', line 46 def synchronizers(synchronizers) @synchronizers = synchronizers self end |