Public API Interface for Configuration. More...
Go to the source code of this file.
Functions | |
struct LDConfig * | LDConfigNew (const char *const mobileKey) |
Creates a new default configuration. mobileKey is required. More... | |
void | LDConfigSetAllAttributesPrivate (struct LDConfig *const config, const LDBoolean allPrivate) |
Marks all user attributes private. | |
void | LDConfigSetBackgroundPollingIntervalMillis (struct LDConfig *const config, const int millis) |
Sets the interval in milliseconds between polls for flag updates when your app is in the background. | |
LDBoolean | LDConfigSetAppURI (struct LDConfig *const config, const char *const uri) |
Sets the interval in milliseconds between polls for flag updates when your app is in the background. | |
void | LDConfigSetConnectionTimeoutMillies (struct LDConfig *const config, const int millis) |
Sets the timeout in milliseconds when connecting to LaunchDarkly. More... | |
void | LDConfigSetConnectionTimeoutMillis (struct LDConfig *const config, const int millis) |
Sets the timeout in milliseconds when connecting to LaunchDarkly. | |
void | LDConfigSetDisableBackgroundUpdating (struct LDConfig *const config, const LDBoolean disable) |
Enable or disable background updating. | |
void | LDConfigSetEventsCapacity (struct LDConfig *const config, const int capacity) |
Sets the max number of events to queue before sending them to LaunchDarkly. | |
void | LDConfigSetEventsFlushIntervalMillis (struct LDConfig *const config, const int millis) |
Sets the maximum amount of time in milliseconds to wait in between sending analytics events to LaunchDarkly. | |
LDBoolean | LDConfigSetEventsURI (struct LDConfig *const config, const char *const uri) |
Set the events uri for sending analytics to LaunchDarkly. You probably don't need to set this unless instructed by LaunchDarkly. | |
LDBoolean | LDConfigSetMobileKey (struct LDConfig *const config, const char *const key) |
Sets the key for authenticating with LaunchDarkly. This is required unless you're using the client in offline mode. | |
void | LDConfigSetOffline (struct LDConfig *const config, const LDBoolean offline) |
Configures the client for offline mode. In offline mode, no external network connections are made. | |
void | LDConfigSetStreaming (struct LDConfig *const config, const LDBoolean streaming) |
Enables or disables real-time streaming flag updates. More... | |
void | LDConfigSetPollingIntervalMillis (struct LDConfig *const config, const int millis) |
Only relevant when streaming is disabled (set to false ). Sets the interval between feature flag updates. | |
LDBoolean | LDConfigSetStreamURI (struct LDConfig *const config, const char *const uri) |
Set the stream uri for connecting to the flag update stream. You probably don't need to set this unless instructed by LaunchDarkly. | |
LDBoolean | LDConfigSetProxyURI (struct LDConfig *const config, const char *const uri) |
Set the proxy server used for connecting to LaunchDarkly. More... | |
void | LDConfigSetVerifyPeer (struct LDConfig *const config, const LDBoolean enabled) |
Set whether to verify the authenticity of the peer's certificate on network requests. More... | |
void | LDConfigSetUseReport (struct LDConfig *const config, const LDBoolean report) |
Determines whether the REPORT or GET verb is used for calls to LaunchDarkly. Do not use unless advised by LaunchDarkly. | |
void | LDConfigSetUseEvaluationReasons (struct LDConfig *const config, const LDBoolean reasons) |
Decide whether the client should fetch feature flag evaluation explanations from LaunchDarkly. | |
void | LDConfigSetPrivateAttributes (struct LDConfig *const config, struct LDJSON *attributes) |
Private attribute list which will not be recorded for all users. | |
LDBoolean | LDConfigAddSecondaryMobileKey (struct LDConfig *const config, const char *const name, const char *const key) |
Add another mobile key to the list of secondary environments. More... | |
LDBoolean | LDConfigSetSSLCertificateAuthority (struct LDConfig *const config, const char *const certFile) |
Set the path to the SSL certificate bundle used for peer authentication. More... | |
void | LDConfigSetInlineUsersInEvents (struct LDConfig *const config, const LDBoolean inlineUsers) |
Determines if an entire user object, or only the user key should be included in events. Defaults to false. | |
void | LDConfigAutoAliasOptOut (struct LDConfig *const config, const LDBoolean optOut) |
Determines if Identify should automatically generate alias events. When true LDClientIdentify will not generate alias events. Defaults to false. | |
void | LDConfigSetRequestTimeoutMillis (struct LDConfig *const config, const int millis) |
Sets the timeout, in milliseconds, for requests to LaunchDarkly. Applies to polling requests and sending events. A value of 0 specifies that the request will never timeout. Defaults to 30000. | |
void | LDConfigFree (struct LDConfig *const config) |
Free an existing LDConfig instance. More... | |
Public API Interface for Configuration.
LDBoolean LDConfigAddSecondaryMobileKey | ( | struct LDConfig *const | config, |
const char *const | name, | ||
const char *const | key | ||
) |
Add another mobile key to the list of secondary environments.
Both name
, and key
must be unique. You may not add the existing primary environment (the one you used to initialize LDConfig
). The name
of the key can later be used in conjunction with LDClientGetForMobileKey
. This function returns false on failure.
void LDConfigFree | ( | struct LDConfig *const | config | ) |
Free an existing LDConfig
instance.
You will likely never use this routine as ownership is transferred to LDClient
on initialization.
struct LDConfig* LDConfigNew | ( | const char *const | mobileKey | ) |
Creates a new default configuration. mobileKey
is required.
The configuration object is intended to be modified until it is passed to LDClientInit
, at which point it should no longer be modified.
void LDConfigSetConnectionTimeoutMillies | ( | struct LDConfig *const | config, |
const int | millis | ||
) |
Sets the timeout in milliseconds when connecting to LaunchDarkly.
LDBoolean LDConfigSetProxyURI | ( | struct LDConfig *const | config, |
const char *const | uri | ||
) |
LDBoolean LDConfigSetSSLCertificateAuthority | ( | struct LDConfig *const | config, |
const char *const | certFile | ||
) |
Set the path to the SSL certificate bundle used for peer authentication.
This API is ineffective if LDConfigSetVerifyPeer is set to false. See CURLOPT_CAINFO for more information.
void LDConfigSetStreaming | ( | struct LDConfig *const | config, |
const LDBoolean | streaming | ||
) |
Enables or disables real-time streaming flag updates.
Default: true
. 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.
void LDConfigSetVerifyPeer | ( | struct LDConfig *const | config, |
const LDBoolean | enabled | ||
) |