C++ Server-Side SDK
LaunchDarkly SDK
Typedefs | Functions
evaluation_series_context.h File Reference

C bindings for read-only evaluation context passed to hooks. More...

#include <launchdarkly/bindings/c/export.h>
#include <launchdarkly/server_side/bindings/c/hook_context.h>
#include <launchdarkly/bindings/c/value.h>
#include <launchdarkly/bindings/c/context.h>
#include <stdbool.h>
Include dependency graph for evaluation_series_context.h:

Go to the source code of this file.

Typedefs

typedef struct p_LDServerSDKEvaluationSeriesContext * LDServerSDKEvaluationSeriesContext
 

Functions

 LDEvaluationSeriesContext_FlagKey (LDServerSDKEvaluationSeriesContext eval_context)
 Get the flag key being evaluated. More...
 
 LDEvaluationSeriesContext_Context (LDServerSDKEvaluationSeriesContext eval_context)
 Get the context (user/organization) being evaluated. More...
 
 LDEvaluationSeriesContext_DefaultValue (LDServerSDKEvaluationSeriesContext eval_context)
 Get the default value provided to the variation call. More...
 
 LDEvaluationSeriesContext_Method (LDServerSDKEvaluationSeriesContext eval_context)
 Get the name of the variation method called. More...
 
 LDEvaluationSeriesContext_HookContext (LDServerSDKEvaluationSeriesContext eval_context)
 Get the hook context provided by the caller. More...
 
 LDEvaluationSeriesContext_EnvironmentId (LDServerSDKEvaluationSeriesContext eval_context)
 Get the environment ID, if available. More...
 

Detailed Description

C bindings for read-only evaluation context passed to hooks.

EvaluationSeriesContext provides information about a flag evaluation to hook callbacks. All data is read-only and valid only during the callback execution.

LIFETIME:

Function Documentation

◆ LDEvaluationSeriesContext_Context()

LDEvaluationSeriesContext_Context ( LDServerSDKEvaluationSeriesContext  eval_context)

Get the context (user/organization) being evaluated.

Parameters
eval_contextEvaluation context. Must not be NULL.
Returns
Context object. Valid only during the callback execution. Must not be freed. Do not call LDContext_Free() on this.

◆ LDEvaluationSeriesContext_DefaultValue()

LDEvaluationSeriesContext_DefaultValue ( LDServerSDKEvaluationSeriesContext  eval_context)

Get the default value provided to the variation call.

Parameters
eval_contextEvaluation context. Must not be NULL.
Returns
Default value. Valid only during the callback execution. Must not be freed. Do not call LDValue_Free() on this.

◆ LDEvaluationSeriesContext_EnvironmentId()

LDEvaluationSeriesContext_EnvironmentId ( LDServerSDKEvaluationSeriesContext  eval_context)

Get the environment ID, if available.

The environment ID is only available after SDK initialization completes. Returns NULL if not yet available.

Parameters
eval_contextEvaluation context. Must not be NULL.
Returns
Environment ID as null-terminated UTF-8 string, or NULL if not available. Valid only during the callback execution. Must not be freed.

◆ LDEvaluationSeriesContext_FlagKey()

LDEvaluationSeriesContext_FlagKey ( LDServerSDKEvaluationSeriesContext  eval_context)

Get the flag key being evaluated.

Parameters
eval_contextEvaluation context. Must not be NULL.
Returns
Flag key as null-terminated UTF-8 string. Valid only during the callback execution. Must not be freed.

◆ LDEvaluationSeriesContext_HookContext()

LDEvaluationSeriesContext_HookContext ( LDServerSDKEvaluationSeriesContext  eval_context)

Get the hook context provided by the caller.

This contains application-specific data passed to the variation call, such as OpenTelemetry span parents.

Parameters
eval_contextEvaluation context. Must not be NULL.
Returns
Hook context. Valid only during the callback execution. Must not be freed. Do not call LDHookContext_Free() on this.

◆ LDEvaluationSeriesContext_Method()

LDEvaluationSeriesContext_Method ( LDServerSDKEvaluationSeriesContext  eval_context)

Get the name of the variation method called.

Examples: "BoolVariation", "StringVariationDetail", "JsonVariation"

Parameters
eval_contextEvaluation context. Must not be NULL.
Returns
Method name as null-terminated UTF-8 string. Valid only during the callback execution. Must not be freed.