Struct launchdarkly_server_sdk::ConfigBuilder
source · pub struct ConfigBuilder { /* private fields */ }Expand description
Used to create a Config struct for creating crate::Client instances.
For usage examples see:
Implementations
sourceimpl ConfigBuilder
impl ConfigBuilder
sourcepub fn new(sdk_key: &str) -> Self
pub fn new(sdk_key: &str) -> Self
Create a new instance of the ConfigBuilder with the provided sdk_key.
sourcepub fn service_endpoints(self, builder: &ServiceEndpointsBuilder) -> Self
pub fn service_endpoints(self, builder: &ServiceEndpointsBuilder) -> Self
Set the URLs to use for this client. For usage see ServiceEndpointsBuilder
sourcepub fn data_store(self, builder: &dyn DataStoreFactory) -> Self
pub fn data_store(self, builder: &dyn DataStoreFactory) -> Self
Set the data store to use for this client.
sourcepub fn data_source(self, builder: &dyn DataSourceFactory) -> Self
pub fn data_source(self, builder: &dyn DataSourceFactory) -> Self
Set the data source to use for this client. For usage see crate::data_source_builders::StreamingDataSourceBuilder
If offline mode is enabled, this data source will be ignored.
sourcepub fn event_processor(self, builder: &dyn EventProcessorFactory) -> Self
pub fn event_processor(self, builder: &dyn EventProcessorFactory) -> Self
Set the event processor to use for this client. For usage see crate::EventProcessorBuilder
If offline mode is enabled, this event processor will be ignored.
sourcepub fn offline(self, offline: bool) -> Self
pub fn offline(self, offline: bool) -> Self
Whether the client should be initialized in offline mode.
In offline mode, default values are returned for all flags and no remote network requests are made. By default, this is false.
sourcepub fn application_info(self, application_info: ApplicationInfo) -> Self
pub fn application_info(self, application_info: ApplicationInfo) -> Self
Provides configuration of application metadata.
These properties are optional and informational. They may be used in LaunchDarkly analytics or other product features, but they do not affect feature flag evaluations.
sourcepub fn build(self) -> Config
pub fn build(self) -> Config
Create a new instance of Config based on the ConfigBuilder configuration.