C++ Client-Side SDK
LaunchDarkly SDK
Public Types | Public Member Functions | List of all members
launchdarkly::config::shared::builders::ConfigBuilder< SDK > Class Template Reference

#include <config_builder.hpp>

Public Types

using Result = Config< SDK >
 
using EndpointsBuilder = launchdarkly::config::shared::builders::EndpointsBuilder< SDK >
 
using EventsBuilder = launchdarkly::config::shared::builders::EventsBuilder< SDK >
 
using DataSourceBuilder = launchdarkly::config::shared::builders::DataSourceBuilder< SDK >
 
using HttpPropertiesBuilder = launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >
 
using PersistenceBuilder = launchdarkly::config::shared::builders::PersistenceBuilder< SDK >
 
using LoggingBuilder = launchdarkly::config::shared::builders::LoggingBuilder
 

Public Member Functions

 ConfigBuilder (std::string sdk_key)
 
EndpointsBuilderServiceEndpoints ()
 
AppInfoBuilderAppInfo ()
 
ConfigBuilderOffline (bool offline)
 
EventsBuilderEvents ()
 
DataSourceBuilderDataSource ()
 
HttpPropertiesBuilderHttpProperties ()
 
LoggingBuilderLogging ()
 
PersistenceBuilderPersistence ()
 
tl::expected< Result, Error > Build () const
 

Detailed Description

template<typename SDK>
class launchdarkly::config::shared::builders::ConfigBuilder< SDK >

ConfigBuilder allows for creation of a Configuration object for use in a Client.

Template Parameters
SDKType of SDK.

Constructor & Destructor Documentation

◆ ConfigBuilder()

template<typename SDK >
launchdarkly::config::shared::builders::ConfigBuilder< SDK >::ConfigBuilder ( std::string  sdk_key)
explicit

A minimal configuration consists of a LaunchDarkly SDK Key.

Parameters
sdk_keySDK Key.

Member Function Documentation

◆ AppInfo()

template<typename SDK >
AppInfoBuilder & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::AppInfo

To include metadata about the application that is utilizing the SDK, pass in an AppInfoBuilder.

Parameters
builderAn AppInfoBuilder.
Returns
Reference to an AppInfoBuilder.

◆ Build()

template<typename SDK >
tl::expected< typename ConfigBuilder< SDK >::Result, Error > launchdarkly::config::shared::builders::ConfigBuilder< SDK >::Build

Builds a Configuration, suitable for passing into an instance of Client.

Returns

◆ DataSource()

template<typename SDK >
ConfigBuilder< SDK >::DataSourceBuilder & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::DataSource

Sets the configuration of the component that receives feature flag data from LaunchDarkly.

Parameters
builderA DataSourceConfig builder.
Returns
Reference to a DataSourceBuilder.

◆ Events()

template<typename SDK >
ConfigBuilder< SDK >::EventsBuilder & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::Events

To tune settings related to event generation and delivery, pass an EventsBuilder.

Parameters
builderAn EventsBuilder.
Returns
Reference to an EventsBuilder.

◆ HttpProperties()

template<typename SDK >
ConfigBuilder< SDK >::HttpPropertiesBuilder & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::HttpProperties

Sets the SDK's networking configuration, using an HttpPropertiesBuilder. The builder has methods for setting individual HTTP-related properties.

Parameters
builderA HttpPropertiesBuilder builder.
Returns
Reference to an HttpPropertiesBuilder.

◆ Logging()

template<typename SDK >
LoggingBuilder & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::Logging

Sets the logging configuration for the SDK.

Parameters
builderA Logging builder.
Returns
Reference to a LoggingBuilder.

◆ Offline()

template<typename SDK >
ConfigBuilder< SDK > & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::Offline ( bool  offline)

Enables or disables "Offline" mode. True means Offline mode is enabled.

Parameters
offlineTrue if the SDK should operate in Offline mode.
Returns
Reference to this builder.

◆ Persistence()

template<typename SDK >
PersistenceBuilder< SDK > & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::Persistence

Sets the persistence configuration for the SDK.

Parameters
builderA persistence builder.
Returns
Reference to a PersistenceBuilder.

◆ ServiceEndpoints()

template<typename SDK >
ConfigBuilder< SDK >::EndpointsBuilder & launchdarkly::config::shared::builders::ConfigBuilder< SDK >::ServiceEndpoints

To customize the ServiceEndpoints the SDK uses for streaming, polling, and events, pass in an EndpointsBuilder.

Parameters
builderAn EndpointsBuilder.
Returns
Reference to an EndpointsBuilder.

The documentation for this class was generated from the following files: