Public API for Configuration. More...
#include <launchdarkly/boolean.h>
#include <launchdarkly/export.h>
#include <launchdarkly/store.h>
#include <launchdarkly/data_source.h>
Go to the source code of this file.
Functions | |
struct LDConfig * | LDConfigNew (const char *const key) |
Creates a new default configuration. The configuration object is intended to be modified until it is passed to LDClientInit, at which point it should no longer be modified. More... | |
void | LDConfigFree (struct LDConfig *const config) |
Destroy a config not associated with a client instance. More... | |
LDBoolean | LDConfigSetBaseURI (struct LDConfig *const config, const char *const baseURI) |
Set the base URI for connecting to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. Defaults to "https://app.launchdarkly.com". More... | |
LDBoolean | LDConfigSetStreamURI (struct LDConfig *const config, const char *const streamURI) |
Set the streaming URI for connecting to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. Defaults to "https://stream.launchdarkly.com". More... | |
LDBoolean | LDConfigSetEventsURI (struct LDConfig *const config, const char *const eventsURI) |
Set the events URI for connecting to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. Defaults to "https://events.launchdarkly.com". More... | |
void | LDConfigSetStream (struct LDConfig *const config, const LDBoolean stream) |
Enables or disables real-time streaming flag updates. When set to false, an efficient caching polling mechanism is used. We do not recommend disabling streaming unless you have been instructed to do so by LaunchDarkly support. Defaults to true. More... | |
void | LDConfigSetSendEvents (struct LDConfig *const config, const LDBoolean sendEvents) |
Sets whether to send analytics events back to LaunchDarkly. By default, the client will send events. This differs from Offline in that it only affects sending events, not streaming or polling for events from the. More... | |
void | LDConfigSetEventsCapacity (struct LDConfig *const config, const unsigned int eventsCapacity) |
The capacity of the events buffer. The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed, events will be discarded. More... | |
void | LDConfigSetTimeout (struct LDConfig *const config, const unsigned int milliseconds) |
The connection timeout to use when making requests to LaunchDarkly. More... | |
void | LDConfigSetFlushInterval (struct LDConfig *const config, const unsigned int milliseconds) |
The time between flushes of the event buffer. Decreasing the flush interval means that the event buffer is less likely to reach capacity. More... | |
void | LDConfigSetPollInterval (struct LDConfig *const config, const unsigned int milliseconds) |
The polling interval (when streaming is disabled). More... | |
void | LDConfigSetOffline (struct LDConfig *const config, const LDBoolean offline) |
Sets whether this client is offline. An offline client will not make any network connections to LaunchDarkly, and will return default values for all feature flags. More... | |
void | LDConfigSetUseLDD (struct LDConfig *const config, const LDBoolean useLDD) |
Sets whether this client should use the LaunchDarkly Relay Proxy in daemon mode. In this mode, the client does not subscribe to the streaming or polling API, but reads data only from the feature store. More... | |
void | LDConfigSetAllAttributesPrivate (struct LDConfig *const config, const LDBoolean allAttributesPrivate) |
Sets whether or not all user attributes (other than the key) should be hidden from LaunchDarkly. If this is true, all user attribute values will be private, not just the attributes specified in PrivateAttributeNames. More... | |
void | LDConfigInlineUsersInEvents (struct LDConfig *const config, const LDBoolean inlineUsersInEvents) |
Set to true if you need to see the full user details in every analytics event. More... | |
void | LDConfigSetUserKeysCapacity (struct LDConfig *const config, const unsigned int userKeysCapacity) |
The number of user keys that the event processor can remember at an one time, so that duplicate user details will not be sent in analytics. More... | |
void | LDConfigSetUserKeysFlushInterval (struct LDConfig *const config, const unsigned int milliseconds) |
The interval at which the event processor will reset its set of known user keys. More... | |
LDBoolean | LDConfigAddPrivateAttribute (struct LDConfig *const config, const char *const attribute) |
Marks a set of user attribute names private. Any users sent to LaunchDarkly with this configuration active will have attributes with these names removed. More... | |
void | LDConfigSetFeatureStoreBackend (struct LDConfig *const config, struct LDStoreInterface *const backend) |
Sets the implementation of FeatureStore for holding feature flags and related data received from LaunchDarkly. More... | |
void | LDConfigSetDataSource (struct LDConfig *const config, struct LDDataSource *const dataSource) |
Sets the implementation of the data source. More... | |
void | LDConfigSetFeatureStoreBackendCacheTTL (struct LDConfig *const config, const unsigned int milliseconds) |
When a feature store backend is provided, configure how long items will be cached in memory. Set the value to zero to always hit the external store backend. If no backend exists this value is ignored. The default cache time is 30 seconds. More... | |
LDBoolean | LDConfigSetWrapperInfo (struct LDConfig *const config, const char *const wrapperName, const char *const wrapperVersion) |
Indicates to LaunchDarkly the name and version of an SDK wrapper library. If wrapperVersion is set wrapperName must be set. More... | |
Public API for Configuration.
LDBoolean LDConfigAddPrivateAttribute | ( | struct LDConfig *const | config, |
const char *const | attribute | ||
) |
Marks a set of user attribute names private. Any users sent to LaunchDarkly with this configuration active will have attributes with these names removed.
[in] | config | The configuration to modify. May not be NULL . |
[in] | attribute | May not be NULL . |
void LDConfigFree | ( | struct LDConfig *const | config | ) |
Destroy a config not associated with a client instance.
[in] | config | May be NULL . |
void LDConfigInlineUsersInEvents | ( | struct LDConfig *const | config, |
const LDBoolean | inlineUsersInEvents | ||
) |
Set to true if you need to see the full user details in every analytics event.
[in] | config | The configuration to modify. May not be NULL . |
[in] | inlineUsersInEvents |
struct LDConfig* LDConfigNew | ( | const char *const | key | ) |
Creates a new default configuration. The configuration object is intended to be modified until it is passed to LDClientInit, at which point it should no longer be modified.
[in] | key | Your projects SDK key. May not be NULL . |
NULL
on failure. void LDConfigSetAllAttributesPrivate | ( | struct LDConfig *const | config, |
const LDBoolean | allAttributesPrivate | ||
) |
Sets whether or not all user attributes (other than the key) should be hidden from LaunchDarkly. If this is true, all user attribute values will be private, not just the attributes specified in PrivateAttributeNames.
[in] | config | The configuration to modify. May not be NULL . |
[in] | allAttributesPrivate |
LDBoolean LDConfigSetBaseURI | ( | struct LDConfig *const | config, |
const char *const | baseURI | ||
) |
Set the base URI for connecting to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. Defaults to "https://app.launchdarkly.com".
[in] | config | The configuration to modify. May not be NULL . |
[in] | baseURI | The new base URI to use. May not be NULL . |
void LDConfigSetDataSource | ( | struct LDConfig *const | config, |
struct LDDataSource *const | dataSource | ||
) |
Sets the implementation of the data source.
[in] | config | The configuration to modify. May not be NULL . |
[in] | dataSource | May be NULL . Ownership of dataSource is transferred. |
void LDConfigSetEventsCapacity | ( | struct LDConfig *const | config, |
const unsigned int | eventsCapacity | ||
) |
The capacity of the events buffer. The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed, events will be discarded.
[in] | config | The configuration to modify. May not be NULL . |
[in] | eventsCapacity |
LDBoolean LDConfigSetEventsURI | ( | struct LDConfig *const | config, |
const char *const | eventsURI | ||
) |
Set the events URI for connecting to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. Defaults to "https://events.launchdarkly.com".
[in] | config | The configuration to modify. May not be NULL . |
[in] | eventsURI | The new events URI to use. May not be NULL . |
void LDConfigSetFeatureStoreBackend | ( | struct LDConfig *const | config, |
struct LDStoreInterface *const | backend | ||
) |
Sets the implementation of FeatureStore for holding feature flags and related data received from LaunchDarkly.
[in] | config | The configuration to modify. May not be NULL . |
[in] | backend | May be NULL . |
void LDConfigSetFeatureStoreBackendCacheTTL | ( | struct LDConfig *const | config, |
const unsigned int | milliseconds | ||
) |
When a feature store backend is provided, configure how long items will be cached in memory. Set the value to zero to always hit the external store backend. If no backend exists this value is ignored. The default cache time is 30 seconds.
[in] | config | The configuration to modify. May not be NULL . |
[in] | milliseconds | How long the cache should live. |
void LDConfigSetFlushInterval | ( | struct LDConfig *const | config, |
const unsigned int | milliseconds | ||
) |
The time between flushes of the event buffer. Decreasing the flush interval means that the event buffer is less likely to reach capacity.
[in] | config | The configuration to modify. May not be NULL . |
[in] | milliseconds |
void LDConfigSetOffline | ( | struct LDConfig *const | config, |
const LDBoolean | offline | ||
) |
Sets whether this client is offline. An offline client will not make any network connections to LaunchDarkly, and will return default values for all feature flags.
[in] | config | The configuration to modify. May not be NULL . |
[in] | offline |
void LDConfigSetPollInterval | ( | struct LDConfig *const | config, |
const unsigned int | milliseconds | ||
) |
The polling interval (when streaming is disabled).
[in] | config | The configuration to modify. May not be NULL . |
[in] | milliseconds |
void LDConfigSetSendEvents | ( | struct LDConfig *const | config, |
const LDBoolean | sendEvents | ||
) |
Sets whether to send analytics events back to LaunchDarkly. By default, the client will send events. This differs from Offline in that it only affects sending events, not streaming or polling for events from the.
[in] | config | The configuration to modify. May not be NULL . |
[in] | sendEvents |
void LDConfigSetStream | ( | struct LDConfig *const | config, |
const LDBoolean | stream | ||
) |
Enables or disables real-time streaming flag updates. When set to false, an efficient caching polling mechanism is used. We do not recommend disabling streaming unless you have been instructed to do so by LaunchDarkly support. Defaults to true.
[in] | config | The configuration to modify. May not be NULL . |
[in] | stream | True for streaming, False for polling. |
LDBoolean LDConfigSetStreamURI | ( | struct LDConfig *const | config, |
const char *const | streamURI | ||
) |
Set the streaming URI for connecting to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. Defaults to "https://stream.launchdarkly.com".
[in] | config | The configuration to modify. May not be NULL . |
[in] | streamURI | The new stream URI to use. May not be NULL . |
void LDConfigSetTimeout | ( | struct LDConfig *const | config, |
const unsigned int | milliseconds | ||
) |
The connection timeout to use when making requests to LaunchDarkly.
[in] | config | The configuration to modify. May not be NULL . |
[in] | milliseconds |
void LDConfigSetUseLDD | ( | struct LDConfig *const | config, |
const LDBoolean | useLDD | ||
) |
Sets whether this client should use the LaunchDarkly Relay Proxy in daemon mode. In this mode, the client does not subscribe to the streaming or polling API, but reads data only from the feature store.
[in] | config | The configuration to modify. May not be NULL . |
[in] | useLDD |
void LDConfigSetUserKeysCapacity | ( | struct LDConfig *const | config, |
const unsigned int | userKeysCapacity | ||
) |
The number of user keys that the event processor can remember at an one time, so that duplicate user details will not be sent in analytics.
[in] | config | The configuration to modify. May not be NULL . |
[in] | userKeysCapacity |
void LDConfigSetUserKeysFlushInterval | ( | struct LDConfig *const | config, |
const unsigned int | milliseconds | ||
) |
The interval at which the event processor will reset its set of known user keys.
[in] | config | The configuration to modify. May not be NULL . |
[in] | milliseconds |
LDBoolean LDConfigSetWrapperInfo | ( | struct LDConfig *const | config, |
const char *const | wrapperName, | ||
const char *const | wrapperVersion | ||
) |
Indicates to LaunchDarkly the name and version of an SDK wrapper library. If wrapperVersion
is set wrapperName
must be set.
[in] | config | The configuration to modify. May not be NULL . |
[in] | wrapperName | The name of the wrapper. May be NULL . |
[in] | wrapperVersion | The version of the wrapper. May be NULL . |