C Server-Side SDK
LaunchDarkly SDK
config.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <launchdarkly/boolean.h>
9 #include <launchdarkly/export.h>
10 #include <launchdarkly/store.h>
12 
17 struct LDConfig;
18 
26 LD_EXPORT(struct LDConfig *) LDConfigNew(const char *const key);
27 
33 LD_EXPORT(void) LDConfigFree(struct LDConfig *const config);
34 
43 LD_EXPORT(LDBoolean)
44 LDConfigSetBaseURI(struct LDConfig *const config, const char *const baseURI);
45 
54 LD_EXPORT(LDBoolean)
56  struct LDConfig *const config, const char *const streamURI);
57 
66 LD_EXPORT(LDBoolean)
68  struct LDConfig *const config, const char *const eventsURI);
69 
79 LD_EXPORT(void)
80 LDConfigSetStream(struct LDConfig *const config, const LDBoolean stream);
81 
90 LD_EXPORT(void)
92  struct LDConfig *const config, const LDBoolean sendEvents);
93 
102 LD_EXPORT(void)
104  struct LDConfig *const config, const unsigned int eventsCapacity);
105 
112 LD_EXPORT(void)
114  struct LDConfig *const config, const unsigned int milliseconds);
115 
123 LD_EXPORT(void)
125  struct LDConfig *const config, const unsigned int milliseconds);
126 
133 LD_EXPORT(void)
135  struct LDConfig *const config, const unsigned int milliseconds);
136 
145 LD_EXPORT(void)
146 LDConfigSetOffline(struct LDConfig *const config, const LDBoolean offline);
147 
156 LD_EXPORT(void)
157 LDConfigSetUseLDD(struct LDConfig *const config, const LDBoolean useLDD);
158 
167 LD_EXPORT(void)
169  struct LDConfig *const config, const LDBoolean allAttributesPrivate);
170 
178 LD_EXPORT(void)
180  struct LDConfig *const config, const LDBoolean inlineUsersInEvents);
181 
189 LD_EXPORT(void)
191  struct LDConfig *const config, const unsigned int userKeysCapacity);
192 
200 LD_EXPORT(void)
202  struct LDConfig *const config, const unsigned int milliseconds);
203 
212 LD_EXPORT(LDBoolean)
214  struct LDConfig *const config, const char *const attribute);
215 
223 LD_EXPORT(void)
225  struct LDConfig *const config, struct LDStoreInterface *const backend);
226 
233 LD_EXPORT(void)
235  struct LDConfig *const config, struct LDDataSource *const dataSource);
236 
246 LD_EXPORT(void)
248  struct LDConfig *const config, const unsigned int milliseconds);
249 
258 LD_EXPORT(LDBoolean)
260  struct LDConfig *const config,
261  const char *const wrapperName,
262  const char *const wrapperVersion);
LDDataSource
An opaque data source object.
LDConfigSetUserKeysCapacity
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 ...
boolean.h
A custom c89 boolean type.
LDStoreInterface
An opaque client object.
Definition: store.h:59
data_source.h
Public API for data source implementation.
LDConfigSetFeatureStoreBackend
void LDConfigSetFeatureStoreBackend(struct LDConfig *const config, struct LDStoreInterface *const backend)
Sets the implementation of FeatureStore for holding feature flags and related data received from Laun...
LDConfigSetUseLDD
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,...
LDConfigInlineUsersInEvents
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.
LDConfigNew
struct LDConfig * LDConfigNew(const char *const key)
Creates a new default configuration. The configuration object is intended to be modified until it is ...
LDConfigFree
void LDConfigFree(struct LDConfig *const config)
Destroy a config not associated with a client instance.
LDConfigSetStream
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...
LDConfigSetFlushInterval
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 buff...
LDConfigSetStreamURI
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 inst...
LDConfigSetPollInterval
void LDConfigSetPollInterval(struct LDConfig *const config, const unsigned int milliseconds)
The polling interval (when streaming is disabled).
LDConfigSetAllAttributesPrivate
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....
LDConfigAddPrivateAttribute
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 a...
store.h
Public API for Store implementations.
LDConfigSetOffline
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 Launc...
LDConfigSetEventsURI
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 instruc...
LD_EXPORT
#define LD_EXPORT(x)
Used to ensure only intended symbols are exported in the binaries.
Definition: export.h:10
LDConfigSetWrapperInfo
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 wr...
LDConfig
An opaque config object.
LDConfigSetSendEvents
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....
LDConfigSetTimeout
void LDConfigSetTimeout(struct LDConfig *const config, const unsigned int milliseconds)
The connection timeout to use when making requests to LaunchDarkly.
LDConfigSetDataSource
void LDConfigSetDataSource(struct LDConfig *const config, struct LDDataSource *const dataSource)
Sets the implementation of the data source.
LDConfigSetFeatureStoreBackendCacheTTL
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....
LDConfigSetBaseURI
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 instructe...
LDConfigSetEventsCapacity
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 flushin...
LDConfigSetUserKeysFlushInterval
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.
export.h
Public. Configuration of exported symbols.