|
C++ Server-Side SDK
LaunchDarkly SDK
|


Go to the source code of this file.
Functions | |
| LDServerFDv2Builder_Default (void) | |
| LDServerFDv2Builder_Custom (void) | |
| LDServerFDv2Builder_Free (LDServerFDv2Builder b) | |
| LDServerFDv2StreamingBuilder_New (void) | |
| LDServerFDv2StreamingBuilder_InitialReconnectDelayMs (LDServerFDv2StreamingBuilder b, unsigned int milliseconds) | |
| LDServerFDv2StreamingBuilder_BaseURL (LDServerFDv2StreamingBuilder b, char const *base_url) | |
| LDServerFDv2StreamingBuilder_Free (LDServerFDv2StreamingBuilder b) | |
| LDServerFDv2PollingBuilder_New (void) | |
| LDServerFDv2PollingBuilder_IntervalS (LDServerFDv2PollingBuilder b, unsigned int seconds) | |
| LDServerFDv2PollingBuilder_BaseURL (LDServerFDv2PollingBuilder b, char const *base_url) | |
| LDServerFDv2PollingBuilder_Free (LDServerFDv2PollingBuilder b) | |
| LDServerFDv2Builder_Initializer_Polling (LDServerFDv2Builder b, LDServerFDv2PollingBuilder polling) | |
| LDServerFDv2Builder_Synchronizer_Streaming (LDServerFDv2Builder b, LDServerFDv2StreamingBuilder streaming) | |
| LDServerFDv2Builder_Synchronizer_Polling (LDServerFDv2Builder b, LDServerFDv2PollingBuilder polling) | |
| LDServerFDv2Builder_FDv1Fallback_Streaming (LDServerFDv2Builder b, LDServerDataSourceStreamBuilder fdv1_streaming) | |
| LDServerFDv2Builder_FDv1Fallback_Polling (LDServerFDv2Builder b, LDServerDataSourcePollBuilder fdv1_polling) | |
| LDServerFDv2Builder_DisableFDv1Fallback (LDServerFDv2Builder b) | |
| LDServerFDv2Builder_FallbackTimeoutMs (LDServerFDv2Builder b, unsigned int milliseconds) | |
| LDServerFDv2Builder_RecoveryTimeoutMs (LDServerFDv2Builder b, unsigned int milliseconds) | |
| LDServerFDv2Builder_Custom | ( | void | ) |
Creates an FDv2 builder with no initializers, no synchronizers, and no FDv1 fallback. Sources must be added explicitly via Initializer_*, Synchronizer_*, and FDv1Fallback_* methods.
If not passed into the config builder, must be manually freed with LDServerFDv2Builder_Free.
| LDServerFDv2Builder_Default | ( | void | ) |
Creates an FDv2 builder pre-populated with the spec-recommended initializers, synchronizers, and FDv1 fallback. Suitable for most applications without further configuration.
If not passed into the config builder, must be manually freed with LDServerFDv2Builder_Free.
| LDServerFDv2Builder_DisableFDv1Fallback | ( | LDServerFDv2Builder | b | ) |
Disables the FDv1 fallback. After this call, an FDv1 fallback directive from the service leaves the data source in the interrupted state and schedules an FDv2 retry on the directive's TTL.
| b | FDv2 builder. Must not be NULL. |
| LDServerFDv2Builder_FallbackTimeoutMs | ( | LDServerFDv2Builder | b, |
| unsigned int | milliseconds | ||
| ) |
Sets how long the active synchronizer may remain interrupted before the orchestrator falls back to the next-preferred synchronizer.
| b | FDv2 builder. Must not be NULL. |
| milliseconds | Duration the synchronizer must be continuously interrupted for before fallback fires. |
| LDServerFDv2Builder_FDv1Fallback_Polling | ( | LDServerFDv2Builder | b, |
| LDServerDataSourcePollBuilder | fdv1_polling | ||
| ) |
Configures the FDv1 polling source used as a last-resort fallback when the LaunchDarkly service signals (via the X-LD-FD-Fallback header) that the SDK should switch to FDv1. The fallback reads its endpoint from the top-level ServiceEndpoints configuration. The source builder is automatically freed.
The fdv1_polling parameter uses the same handle type as the BackgroundSync polling synchronizer (LDServerDataSourcePollBuilder_New); the underlying C++ type is shared.
WARNING: Do not call any other LDServerDataSourcePollBuilder function on the provided builder after calling this function. It is undefined behavior.
| b | FDv2 builder. Must not be NULL. |
| fdv1_polling | The FDv1 Polling source builder. The builder is consumed; do not free it. Must not be NULL. |
| LDServerFDv2Builder_FDv1Fallback_Streaming | ( | LDServerFDv2Builder | b, |
| LDServerDataSourceStreamBuilder | fdv1_streaming | ||
| ) |
Configures the FDv1 streaming source used as a last-resort fallback when the LaunchDarkly service signals (via the X-LD-FD-Fallback header) that the SDK should switch to FDv1. The fallback reads its endpoint from the top-level ServiceEndpoints configuration. The source builder is automatically freed.
The fdv1_streaming parameter uses the same handle type as the BackgroundSync streaming synchronizer (LDServerDataSourceStreamBuilder_New); the underlying C++ type is shared.
WARNING: Do not call any other LDServerDataSourceStreamBuilder function on the provided builder after calling this function. It is undefined behavior.
| b | FDv2 builder. Must not be NULL. |
| fdv1_streaming | The FDv1 Streaming source builder. The builder is consumed; do not free it. Must not be NULL. |
| LDServerFDv2Builder_Free | ( | LDServerFDv2Builder | b | ) |
Frees an FDv2 builder. Do not call if the builder was consumed by the config builder.
| b | Builder to free. |
| LDServerFDv2Builder_Initializer_Polling | ( | LDServerFDv2Builder | b, |
| LDServerFDv2PollingBuilder | polling | ||
| ) |
Appends an FDv2 polling initializer to the FDv2 builder's initializers list. The source builder is automatically freed.
WARNING: Do not call any other LDServerFDv2PollingBuilder function on the provided builder after calling this function. It is undefined behavior.
| b | FDv2 builder. Must not be NULL. |
| polling | The FDv2 Polling source builder. The builder is consumed; do not free it. Must not be NULL. |
| LDServerFDv2Builder_RecoveryTimeoutMs | ( | LDServerFDv2Builder | b, |
| unsigned int | milliseconds | ||
| ) |
Sets how long a fallback synchronizer must run successfully before the orchestrator attempts to recover to the primary synchronizer.
| b | FDv2 builder. Must not be NULL. |
| milliseconds | Duration the fallback synchronizer must run before a recovery attempt is made. |
| LDServerFDv2Builder_Synchronizer_Polling | ( | LDServerFDv2Builder | b, |
| LDServerFDv2PollingBuilder | polling | ||
| ) |
Appends an FDv2 polling synchronizer to the FDv2 builder's synchronizers list. The source builder is automatically freed.
See LDServerFDv2Builder_Synchronizer_Streaming for ordering semantics.
WARNING: Do not call any other LDServerFDv2PollingBuilder function on the provided builder after calling this function. It is undefined behavior.
| b | FDv2 builder. Must not be NULL. |
| polling | The FDv2 Polling source builder. The builder is consumed; do not free it. Must not be NULL. |
| LDServerFDv2Builder_Synchronizer_Streaming | ( | LDServerFDv2Builder | b, |
| LDServerFDv2StreamingBuilder | streaming | ||
| ) |
Appends an FDv2 streaming synchronizer to the FDv2 builder's synchronizers list. The source builder is automatically freed.
Order in the list determines preference: the first entry is the primary synchronizer, subsequent entries are fallbacks.
WARNING: Do not call any other LDServerFDv2StreamingBuilder function on the provided builder after calling this function. It is undefined behavior.
| b | FDv2 builder. Must not be NULL. |
| streaming | The FDv2 Streaming source builder. The builder is consumed; do not free it. Must not be NULL. |
| LDServerFDv2PollingBuilder_BaseURL | ( | LDServerFDv2PollingBuilder | b, |
| char const * | base_url | ||
| ) |
Overrides the base URL used by this FDv2 polling source. By default the polling source reads its endpoint from the top-level ServiceEndpoints configuration; this override takes precedence for this source only.
| b | FDv2 Polling source builder. Must not be NULL. |
| base_url | Target URL. Must not be NULL. |
| LDServerFDv2PollingBuilder_Free | ( | LDServerFDv2PollingBuilder | b | ) |
Frees an FDv2 Polling source builder. Do not call if the builder was consumed by an FDv2 builder.
| b | Builder to free. |
| LDServerFDv2PollingBuilder_IntervalS | ( | LDServerFDv2PollingBuilder | b, |
| unsigned int | seconds | ||
| ) |
Sets the interval at which this FDv2 polling source will poll for flag updates.
| b | FDv2 Polling source builder. Must not be NULL. |
| seconds | Polling interval in seconds. |
| LDServerFDv2PollingBuilder_New | ( | void | ) |
Creates a new FDv2 Polling source builder.
If not passed into an FDv2 builder, must be manually freed with LDServerFDv2PollingBuilder_Free.
| LDServerFDv2StreamingBuilder_BaseURL | ( | LDServerFDv2StreamingBuilder | b, |
| char const * | base_url | ||
| ) |
Overrides the base URL used by this FDv2 streaming source. By default the streaming source reads its endpoint from the top-level ServiceEndpoints configuration; this override takes precedence for this source only.
| b | FDv2 Streaming source builder. Must not be NULL. |
| base_url | Target URL. Must not be NULL. |
| LDServerFDv2StreamingBuilder_Free | ( | LDServerFDv2StreamingBuilder | b | ) |
Frees an FDv2 Streaming source builder. Do not call if the builder was consumed by an FDv2 builder.
| b | Builder to free. |
| LDServerFDv2StreamingBuilder_InitialReconnectDelayMs | ( | LDServerFDv2StreamingBuilder | b, |
| unsigned int | milliseconds | ||
| ) |
Sets the initial reconnect delay for the FDv2 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.
| b | FDv2 Streaming source builder. Must not be NULL. |
| milliseconds | Initial delay for a reconnection attempt. |
| LDServerFDv2StreamingBuilder_New | ( | void | ) |
Creates a new FDv2 Streaming source builder.
If not passed into an FDv2 builder, must be manually freed with LDServerFDv2StreamingBuilder_Free.