C++ Client-Side SDK
LaunchDarkly SDK
|
#include <data_source_builder.hpp>
Public Member Functions | |
StreamingBuilder & | InitialReconnectDelay (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 |
Builds a configuration for a streaming data source.
built::StreamingConfig< SDK > launchdarkly::config::shared::builders::StreamingBuilder< SDK >::Build |
Build the streaming config. Used internal to the SDK.
|
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.
filter_key | The 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. |
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.
initial_reconnect_delay | The initial delay for a reconnection attempt. |