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

#include <data_source_builder.hpp>

Public Member Functions

StreamingBuilderInitialReconnectDelay (std::chrono::milliseconds initial_reconnect_delay)
 
template<typename T = SDK>
std::enable_if_t< is_server_sdk< T >::value, StreamingBuilder & > Filter (std::string filter_key)
 
built::StreamingConfig< SDK > Build () const
 

Detailed Description

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

Builds a configuration for a streaming data source.

Member Function Documentation

◆ Build()

Build the streaming config. Used internal to the SDK.

Returns
The built config.

◆ Filter()

template<typename SDK >
template<typename T = SDK>
std::enable_if_t<is_server_sdk<T>::value, StreamingBuilder&> launchdarkly::config::shared::builders::StreamingBuilder< SDK >::Filter ( std::string  filter_key)
inline

Sets the filter key for the streaming connection.

By default, the SDK is able to evaluate all flags in an environment.

If this is undesirable - for example, because the environment contains thousands of flags, but this application only needs to evaluate a smaller, known subset - then a filter may be setup in LaunchDarkly, and the filter's key specified here.

Evaluations for flags that aren't part of the filtered environment will return default values.

Parameters
filter_keyThe filter key. If the key is malformed or nonexistent, then a full LaunchDarkly environment will be fetched. In the case of a malformed key, the SDK will additionally log a runtime error.
Returns
Reference to this builder.

◆ InitialReconnectDelay()

template<typename SDK >
StreamingBuilder< SDK > & launchdarkly::config::shared::builders::StreamingBuilder< SDK >::InitialReconnectDelay ( std::chrono::milliseconds  initial_reconnect_delay)

Sets the initial reconnect delay for the streaming connection.

The streaming service uses a backoff algorithm (with jitter) every time the connection needs to be reestablished.The delay for the first reconnection will start near this value, and then increase exponentially for any subsequent connection failures.

Parameters
initial_reconnect_delayThe initial delay for a reconnection attempt.
Returns
Reference to this builder.

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