C++ Server-Side SDK
LaunchDarkly SDK
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
sdk.h File Reference

LaunchDarkly Server-side C Bindings. More...

#include <launchdarkly/server_side/bindings/c/all_flags_state/all_flags_state.h>
#include <launchdarkly/server_side/bindings/c/config/builder.h>
#include <launchdarkly/bindings/c/context.h>
#include <launchdarkly/bindings/c/data/evaluation_detail.h>
#include <launchdarkly/bindings/c/data_source/error_info.h>
#include <launchdarkly/bindings/c/export.h>
#include <launchdarkly/bindings/c/listener_connection.h>
#include <launchdarkly/bindings/c/memory_routines.h>
#include <launchdarkly/bindings/c/shared_function_argument_macro_definitions.h>
#include <launchdarkly/bindings/c/status.h>
#include <launchdarkly/bindings/c/value.h>
#include <stddef.h>
#include <stdint.h>
#include <time.h>
Include dependency graph for sdk.h:

Go to the source code of this file.

Classes

struct  LDServerDataSourceStatusListener
 

Typedefs

typedef struct _LDServerSDK * LDServerSDK
 
typedef struct _LDServerDataSourceStatus * LDServerDataSourceStatus
 
typedef void(* ServerDataSourceStatusCallbackFn) (LDServerDataSourceStatus status, void *user_data)
 

Enumerations

enum  LDServerDataSourceStatus_State { LD_SERVERDATASOURCESTATUS_STATE_INITIALIZING = 0 , LD_SERVERDATASOURCESTATUS_STATE_VALID = 1 , LD_SERVERDATASOURCESTATUS_STATE_INTERRUPTED = 2 , LD_SERVERDATASOURCESTATUS_STATE_OFF = 3 }
 

Functions

 LDServerSDK_New (LDServerConfig config)
 
 LDServerSDK_Version (void)
 
 LDServerSDK_Start (LDServerSDK sdk, unsigned int milliseconds, bool *out_succeeded)
 
 LDServerSDK_Initialized (LDServerSDK sdk)
 
 LDServerSDK_TrackEvent (LDServerSDK sdk, LDContext context, char const *event_name)
 
 LDServerSDK_TrackMetric (LDServerSDK sdk, LDContext context, char const *event_name, double metric_value, LDValue data)
 
 LDServerSDK_TrackData (LDServerSDK sdk, LDContext context, char const *event_name, LDValue data)
 
 LDServerSDK_Flush (LDServerSDK sdk, unsigned int reserved)
 
 LDServerSDK_Identify (LDServerSDK sdk, LDContext context)
 
 LDServerSDK_BoolVariation (LDServerSDK sdk, LDContext context, char const *flag_key, bool default_value)
 
 LDServerSDK_BoolVariationDetail (LDServerSDK sdk, LDContext context, char const *flag_key, bool default_value, LDEvalDetail *out_detail)
 
 LDServerSDK_StringVariation (LDServerSDK sdk, LDContext context, char const *flag_key, char const *default_value)
 
 LDServerSDK_StringVariationDetail (LDServerSDK sdk, LDContext context, char const *flag_key, char const *default_value, LDEvalDetail *out_detail)
 
 LDServerSDK_IntVariation (LDServerSDK sdk, LDContext context, char const *flag_key, int default_value)
 
 LDServerSDK_IntVariationDetail (LDServerSDK sdk, LDContext context, char const *flag_key, int default_value, LDEvalDetail *out_detail)
 
 LDServerSDK_DoubleVariation (LDServerSDK sdk, LDContext context, char const *flag_key, double default_value)
 
 LDServerSDK_DoubleVariationDetail (LDServerSDK sdk, LDContext context, char const *flag_key, double default_value, LDEvalDetail *out_detail)
 
 LDServerSDK_JsonVariation (LDServerSDK sdk, LDContext context, char const *flag_key, LDValue default_value)
 
 LDServerSDK_JsonVariationDetail (LDServerSDK sdk, LDContext context, char const *flag_key, LDValue default_value, LDEvalDetail *out_detail)
 
 LDServerSDK_AllFlagsState (LDServerSDK sdk, LDContext context, enum LDAllFlagsState_Options options)
 
 LDServerSDK_Free (LDServerSDK sdk)
 
 LDServerDataSourceStatus_GetState (LDServerDataSourceStatus status)
 
 LDServerDataSourceStatus_GetLastError (LDServerDataSourceStatus status)
 
 LDServerDataSourceStatus_StateSince (LDServerDataSourceStatus status)
 
 LDServerDataSourceStatusListener_Init (struct LDServerDataSourceStatusListener *listener)
 
 LDServerSDK_DataSourceStatus_OnStatusChange (LDServerSDK sdk, struct LDServerDataSourceStatusListener listener)
 
 LDServerSDK_DataSourceStatus_Status (LDServerSDK sdk)
 
 LDServerDataSourceStatus_Free (LDServerDataSourceStatus status)
 

Detailed Description

LaunchDarkly Server-side C Bindings.

Enumeration Type Documentation

◆ LDServerDataSourceStatus_State

Enumeration of possible data source states.

Enumerator
LD_SERVERDATASOURCESTATUS_STATE_INITIALIZING 

The initial state of the data source when the SDK is being initialized.

If it encounters an error that requires it to retry initialization, the state will remain at kInitializing until it either succeeds and becomes LD_SERVERDATASOURCESTATUS_STATE_VALID, or permanently fails and becomes LD_SERVERDATASOURCESTATUS_STATE_SHUTDOWN.

LD_SERVERDATASOURCESTATUS_STATE_VALID 

Indicates that the data source is currently operational and has not had any problems since the last time it received data.

In streaming mode, this means that there is currently an open stream connection and that at least one initial message has been received on the stream. In polling mode, it means that the last poll request succeeded.

LD_SERVERDATASOURCESTATUS_STATE_INTERRUPTED 

Indicates that the data source encountered an error that it will attempt to recover from.

In streaming mode, this means that the stream connection failed, or had to be dropped due to some other error, and will be retried after a backoff delay. In polling mode, it means that the last poll request failed, and a new poll request will be made after the configured polling interval.

LD_SERVERDATASOURCESTATUS_STATE_OFF 

Indicates that the data source has been permanently shut down.

This could be because it encountered an unrecoverable error (for instance, the LaunchDarkly service rejected the SDK key; an invalid SDK key will never become valid), or because the SDK client was explicitly shut down.

Function Documentation

◆ LDServerDataSourceStatus_Free()

LDServerDataSourceStatus_Free ( LDServerDataSourceStatus  status)

Frees the data source status.

Parameters
statusThe data source status to free.

◆ LDServerDataSourceStatus_GetLastError()

LDServerDataSourceStatus_GetLastError ( LDServerDataSourceStatus  status)

Information about the last error that the data source encountered, if any. If there has not been an error, then NULL will be returned.

If a non-NULL value is returned, then it should be freed using LDDataSourceStatus_ErrorInfo_Free.

This property should be updated whenever the data source encounters a problem, even if it does not cause the state to change. For instance, if a stream connection fails and the state changes to LD_SERVERDATASOURCESTATUS_STATE_INTERRUPTED, and then subsequent attempts to restart the connection also fail, the state will remain LD_SERVERDATASOURCESTATUS_STATE_INTERRUPTED but the error information will be updated each time– and the last error will still be reported in this property even if the state later becomes LD_SERVERDATASOURCESTATUS_STATE_VALID.

◆ LDServerDataSourceStatus_GetState()

LDServerDataSourceStatus_GetState ( LDServerDataSourceStatus  status)

Get an enumerated value representing the overall current state of the data source.

◆ LDServerDataSourceStatus_StateSince()

LDServerDataSourceStatus_StateSince ( LDServerDataSourceStatus  status)

The date/time that the value of State most recently changed, in seconds since epoch.

The meaning of this depends on the current state:

  • For LD_SERVERDATASOURCESTATUS_STATE_INITIALIZING, it is the time that the SDK started initializing.
  • For LD_SERVERDATASOURCESTATUS_STATE_VALID, it is the time that the data source most recently entered a valid state, after previously having been LD_SERVERDATASOURCESTATUS_STATE_INITIALIZING or an invalid state such as LD_SERVERDATASOURCESTATUS_STATE_INTERRUPTED.
  • For LD_SERVERDATASOURCESTATUS_STATE_INTERRUPTED, it is the time that the data source most recently entered an error state, after previously having been DataSourceState::kValid.
  • For LD_SERVERDATASOURCESTATUS_STATE_SHUTDOWN, it is the time that the data source encountered an unrecoverable error or that the SDK was explicitly shut down.

◆ LDServerDataSourceStatusListener_Init()

LDServerDataSourceStatusListener_Init ( struct LDServerDataSourceStatusListener listener)

Initializes a data source status change listener. Must be called before passing the listener to LDServerSDK_DataSourceStatus_OnStatusChange.

If the StatusChanged member of the listener struct is not set (NULL), then the function will not register a listener. In that case the return value will be NULL.

Create the struct, initialize the struct, set the StatusChanged handler and optionally UserData, and then pass the struct to LDServerSDK_DataSourceStatus_OnStatusChange. NULL will be returned if the StatusChanged member of the listener struct is NULL.

Parameters
listenerListener to initialize.

◆ LDServerSDK_AllFlagsState()

LDServerSDK_AllFlagsState ( LDServerSDK  sdk,
LDContext  context,
enum LDAllFlagsState_Options  options 
)

Evaluates all flags for a context, returning a data structure containing the results and additional flag metadata.

The method's behavior can be controlled by passing a combination of one or more options.

A common use-case for AllFlagsState is to generate data suitable for bootstrapping the client-side JavaScript SDK.

This method will not send analytics events back to LaunchDarkly.

Parameters
sdkSDK. Must not be NULL.
contextThe context against which all flags will be evaluated. Ownership is NOT transferred. Must not be NULL.
optionsA combination of one or more options. Pass LD_ALLFLAGSSTATE_DEFAULT for default behavior.
Returns
An AllFlagsState data structure. Must be freed with LDAllFlagsState_Free.

◆ LDServerSDK_BoolVariation()

LDServerSDK_BoolVariation ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
bool  default_value 
)

Returns the boolean value of a feature flag for a given flag key and context.

bool value = LDServerSDK_BoolVariation(sdk, context, "my-flag", false);
LDServerSDK_BoolVariation(LDServerSDK sdk, LDContext context, char const *flag_key, bool default_value)
Definition sdk.cpp:172
Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
Returns
The variation for the given context, or default_value if the flag is disabled in the LaunchDarkly control panel.

◆ LDServerSDK_BoolVariationDetail()

LDServerSDK_BoolVariationDetail ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
bool  default_value,
LDEvalDetail *  out_detail 
)

Returns the boolean value of a feature flag for a given flag key and context, and details that also describes the way the value was determined.

LDEvalDetail detail;
bool value = LDServerSDK_BoolVariationDetail(sdk, context, "my-flag", false,
&detail);
// Use the detail object, then free it.
LDEvalDetail_Free(LDEvalDetail detail)
Definition evaluation_detail.cpp:17
LDServerSDK_BoolVariationDetail(LDServerSDK sdk, LDContext context, char const *flag_key, bool default_value, LDEvalDetail *out_detail)
Definition sdk.cpp:185
Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
detailOut parameter to store the details. May pass LD_DISCARD_DETAILS or NULL to discard the details. The details object must be freed with LDEvalDetail_Free.
Returns
The variation for the given context, or default_value if the flag is disabled in the LaunchDarkly control panel.

◆ LDServerSDK_DataSourceStatus_OnStatusChange()

LDServerSDK_DataSourceStatus_OnStatusChange ( LDServerSDK  sdk,
struct LDServerDataSourceStatusListener  listener 
)

Listen for changes to the data source status.

Parameters
sdkSDK. Must not be NULL.
listenerThe listener, whose StatusChanged callback will be invoked, when the data source status changes. Must not be NULL.
Returns
A LDListenerConnection. The connection can be freed using LDListenerConnection_Free and the listener can be disconnected using LDListenerConnection_Disconnect.

◆ LDServerSDK_DataSourceStatus_Status()

LDServerSDK_DataSourceStatus_Status ( LDServerSDK  sdk)

The current status of the data source.

The caller must free the returned value using LDServerDataSourceStatus_Free.

◆ LDServerSDK_DoubleVariation()

LDServerSDK_DoubleVariation ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
double  default_value 
)

Returns the double value of a feature flag for a given flag key and context.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
Returns
The variation for the given context, or default_value if the flag is disabled in the LaunchDarkly control panel.

◆ LDServerSDK_DoubleVariationDetail()

LDServerSDK_DoubleVariationDetail ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
double  default_value,
LDEvalDetail *  out_detail 
)

Returns the double value of a feature flag for a given flag key and context, and details that also describes the way the value was determined.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
detailOut parameter to store the details. May pass LD_DISCARD_DETAILS or NULL to discard the details. The details object must be freed with LDEvalDetail_Free.
Returns
The variation for the given context, or default_value if the flag is disabled in the LaunchDarkly control panel.

◆ LDServerSDK_Flush()

LDServerSDK_Flush ( LDServerSDK  sdk,
unsigned int  reserved 
)

Requests delivery of all pending analytic events (if any).

You MUST pass LD_NONBLOCKING as the second parameter.

LDServerSDK_Flush(sdk, LD_NONBLOCKING);
LDServerSDK_Flush(LDServerSDK sdk, unsigned int reserved)
Definition sdk.cpp:157
Parameters
sdkSDK. Must not be NULL.
millisecondsMust pass LD_NONBLOCKING.

◆ LDServerSDK_Free()

LDServerSDK_Free ( LDServerSDK  sdk)

Frees the SDK's resources, shutting down any connections. May block.

Parameters
sdkSDK.

◆ LDServerSDK_Identify()

LDServerSDK_Identify ( LDServerSDK  sdk,
LDContext  context 
)

Generates an identify event for the given context.

LDServerSDK_Identify(sdk, context);
LDServerSDK_Identify(LDServerSDK sdk, LDContext context)
Definition sdk.cpp:164
Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.

◆ LDServerSDK_Initialized()

LDServerSDK_Initialized ( LDServerSDK  sdk)

Returns a boolean value indicating LaunchDarkly connection and flag state within the client.

bool initialized = LDServerSDK_Initialized(sdk);
LDServerSDK_Initialized(LDServerSDK sdk)

When you first start the client, once Start has completed, Initialized should return true if and only if either 1. it connected to LaunchDarkly and successfully retrieved flags, or 2. it started in offline mode so there's no need to connect to LaunchDarkly.

If the client timed out trying to connect to LD, then Initialized returns false (even if we do have cached flags). If the client connected and got a 401 error, Initialized is will return false. This serves the purpose of letting the app know that there was a problem of some kind.

Parameters
sdkSDK. Must not be NULL.
Returns
True if initialized.

◆ LDServerSDK_IntVariation()

LDServerSDK_IntVariation ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
int  default_value 
)

Returns the int value of a feature flag for a given flag key and context.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
Returns
The variation for the given context, or default_value if the flag is disabled in the LaunchDarkly control panel.

◆ LDServerSDK_IntVariationDetail()

LDServerSDK_IntVariationDetail ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
int  default_value,
LDEvalDetail *  out_detail 
)

Returns the int value of a feature flag for a given flag key and context, and details that also describes the way the value was determined.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
detailOut parameter to store the details. May pass LD_DISCARD_DETAILS or NULL to discard the details. The details object must be freed with LDEvalDetail_Free.
Returns
The variation for the given context, or default_value if the flag is disabled in the LaunchDarkly control panel.

◆ LDServerSDK_JsonVariation()

LDServerSDK_JsonVariation ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
LDValue  default_value 
)

Returns the JSON value of a feature flag for a given flag key and context.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag. Ownership is NOT transferred.
Returns
The variation for the given context, or a copy of default_value if the flag is disabled in the LaunchDarkly control panel. The returned value must be freed using LDValue_Free.

◆ LDServerSDK_JsonVariationDetail()

LDServerSDK_JsonVariationDetail ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
LDValue  default_value,
LDEvalDetail *  out_detail 
)

Returns the JSON value of a feature flag for a given flag key and context, and details that also describes the way the value was determined.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag. Ownership is NOT transferred.
detailOut parameter to store the details. May pass LD_DISCARD_DETAILS or NULL to discard the details. The details object must be freed with LDEvalDetail_Free.
Returns
The variation for the given context, or a copy of default_value if the flag is disabled in the LaunchDarkly control panel. The returned value must be freed using LDValue_Free.

◆ LDServerSDK_New()

LDServerSDK_New ( LDServerConfig  config)

Constructs a new server-side LaunchDarkly SDK from a configuration.

LDServerSDK sdk = LDServerSDK_New(config);
// Later, when the SDK is no longer in use:
LDServerSDK_New(LDServerConfig config)
Definition sdk.cpp:64
LDServerSDK_Free(LDServerSDK sdk)
Parameters
configThe configuration. Ownership is transferred. Do not free or access the LDServerConfig in any way after this call, otherwise behavior is undefined. Must not be NULL.
Returns
New SDK instance. Must be freed with LDServerSDK_Free when no longer needed.

◆ LDServerSDK_Start()

LDServerSDK_Start ( LDServerSDK  sdk,
unsigned int  milliseconds,
bool *  out_succeeded 
)

Starts the SDK, initiating a connection to LaunchDarkly if not offline.

Only one Start call can be in progress at once; calling it concurrently invokes undefined behavior.

The method may be blocking or asynchronous depending on the arguments.

To block, pass a positive milliseconds value and an optional pointer to a boolean. The return value will be true if the SDK started within the specified timeframe, or false if the operation couldn't complete in time. The value of out_succeeded will be true if the SDK successfully initialized.

Example:

bool initialized_successfully;
if (LDServerSDK_Start(client, 5000, &initialized_successfully)) {
// The client was able to initialize in less than 5 seconds.
if (initialized_successfully) {
// Initialization succeeded.
else {
// Initialization failed.
}
} else {
// The client is still initializing.
}
LDServerSDK_Start(LDServerSDK sdk, unsigned int milliseconds, bool *out_succeeded)
Definition sdk.cpp:81

To start asynchronously, pass LD_NONBLOCKING. In this case, the return value will be false and you may pass NULL to out_succeeded.

// Returns immediately.
LDServerSDK_Start(client, LD_NONBLOCKING, NULL);
Parameters
sdkSDK. Must not be NULL.
millisecondsMilliseconds to wait for initialization or LD_NONBLOCKING to return immediately.
out_succeededPointer to bool representing successful initialization. Only modified if a positive milliseconds value is passed; may be NULL.
Returns
True if the client started within the specified timeframe.

◆ LDServerSDK_StringVariation()

LDServerSDK_StringVariation ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
char const *  default_value 
)

Returns the string value of a feature flag for a given flag key and context. Ensure the string is freed with LDMemory_FreeString.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
Returns
The variation for the given context, or a copy of default_value if the flag is disabled in the LaunchDarkly control panel. Must be freed with LDMemory_FreeString.

◆ LDServerSDK_StringVariationDetail()

LDServerSDK_StringVariationDetail ( LDServerSDK  sdk,
LDContext  context,
char const *  flag_key,
char const *  default_value,
LDEvalDetail *  out_detail 
)

Returns the string value of a feature flag for a given flag key and context, and details that also describes the way the value was determined. Ensure the string is freed with LDMemory_FreeString.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
flag_keyThe unique key for the feature flag. Must not be NULL.
default_valueThe default value of the flag.
detailOut parameter to store the details. May pass LD_DISCARD_DETAILS or NULL to discard the details. The details object must be freed with LDEvalDetail_Free.
Returns
The variation for the given context, or a copy of default_value if the flag is disabled in the LaunchDarkly control panel. Must be freed with LDMemory_FreeString.

◆ LDServerSDK_TrackData()

LDServerSDK_TrackData ( LDServerSDK  sdk,
LDContext  context,
char const *  event_name,
LDValue  data 
)

Tracks that the given context performed an event with the given event name, with additional JSON data.

LDServerSDK_TrackData(sdk, context, "my-data", LDValue_NewString("data"));
LDServerSDK_TrackData(LDServerSDK sdk, LDContext context, char const *event_name, LDValue data)
Definition sdk.cpp:140
LDValue_NewString(char const *val)
Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
event_nameThe name of the event. Must not be NULL.
dataA JSON value containing additional data associated with the event. Ownership is transferred. Must not be NULL.

◆ LDServerSDK_TrackEvent()

LDServerSDK_TrackEvent ( LDServerSDK  sdk,
LDContext  context,
char const *  event_name 
)

Tracks that the given context performed an event with the given event name.

LDServerSDK_TrackEvent(sdk, context, "my-event");
LDServerSDK_TrackEvent(LDServerSDK sdk, LDContext context, char const *event_name)
Definition sdk.cpp:110
Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
event_nameName of the event. Must not be NULL.

◆ LDServerSDK_TrackMetric()

LDServerSDK_TrackMetric ( LDServerSDK  sdk,
LDContext  context,
char const *  event_name,
double  metric_value,
LDValue  data 
)

Tracks that the given context performed an event with the given event name, and associates it with a numeric metric and value.

If the data parameter isn't needed, pass LDValue_NewNull() as the value:

LDServerSDK_TrackMetric(sdk, context, "my-metric", 3.14, LDValue_NewNull());
LDServerSDK_TrackMetric(LDServerSDK sdk, LDContext context, char const *event_name, double metric_value, LDValue data)
Definition sdk.cpp:121
LDValue_NewNull()

If the data parameter is needed (example using a string):

LDServerSDK_TrackMetric(sdk, context, "my-metric", 3.14,

If the metric value isn't needed, see LDServerSDK_TrackData.

Parameters
sdkSDK. Must not be NULL.
contextThe context. Ownership is NOT transferred. Must not be NULL.
event_nameThe name of the event. Must not be NULL.
metric_valueThis value is used by the LaunchDarkly experimentation feature in numeric custom metrics, and will also be returned as part of the custom event for Data Export.
dataA JSON value containing additional data associated with the event. Ownership is transferred into the SDK. Must not be NULL.

◆ LDServerSDK_Version()

LDServerSDK_Version ( void  )

Returns the version of the SDK.

char const* version = LDServerSDK_Version();
LDServerSDK_Version(void)
Definition sdk.cpp:76
Returns
String representation of the SDK version.