C Server-Side SDK
LaunchDarkly SDK
|
|
Go to the documentation of this file.
159 const struct LDUser *
const user,
160 const char *
const key,
161 const LDBoolean fallback,
177 const struct LDUser *
const user,
178 const char *
const key,
195 const struct LDUser *
const user,
196 const char *
const key,
197 const double fallback,
216 const struct LDUser *
const user,
217 const char *
const key,
218 const char *
const fallback,
237 const struct LDUser *
const user,
238 const char *
const key,
239 const struct LDJSON *
const fallback,
@ LD_OFF
Indicates that the flag was off and therefore returned its configured off value.
Definition: variations.h:26
LDEvalErrorKind
Details about the type of error that caused an evaluation to fail.
Definition: variations.h:42
struct LDDetailsFallthrough fallthrough
when reason == LD_FALLTHROUGH
Definition: variations.h:110
A custom c89 boolean type.
@ LD_MALFORMED_FLAG
Indicates that there was an internal inconsistency in the flag data, a rule specified a nonexistent v...
Definition: variations.h:61
LDBoolean inExperiment
Whether the evaluation was part of an experiment. Is true if the evaluation resulted in an experiment...
Definition: variations.h:79
@ LD_FALLTHROUGH
Indicates that the flag was on but the user did not match any targets or rules.
Definition: variations.h:38
@ LD_RULE_MATCH
Indicates that the user matched one of the flag's rules.
Definition: variations.h:35
LDBoolean LDBoolVariation(struct LDClient *const client, const struct LDUser *const user, const char *const key, const LDBoolean fallback, struct LDDetails *const details)
Evaluate a boolean flag.
Extra information when reason == LD_FALLTHROUGH.
Definition: variations.h:83
struct LDAllFlagsState * LDAllFlagsState(struct LDClient *const client, const struct LDUser *const user, unsigned int options)
AllFlagsState returns an object that encapsulates the state of all feature flags for a given user....
void LDDetailsClear(struct LDDetails *const details)
Free any resources associated with details
char * LDStringVariation(struct LDClient *const client, const struct LDUser *const user, const char *const key, const char *const fallback, struct LDDetails *const details)
Evaluate a text flag.
@ LD_FLAG_NOT_FOUND
Indicates that the caller provided a flag key that did not match any known flag.
Definition: variations.h:53
unsigned int variationIndex
The index of the returned value within the flag's list of variations.
Definition: variations.h:95
int LDIntVariation(struct LDClient *const client, const struct LDUser *const user, const char *const key, const int fallback, struct LDDetails *const details)
Evaluate a integer flag.
@ LD_PREREQUISITE_FAILED
Indicates that the flag was considered off because it had at least one prerequisite flag that either ...
Definition: variations.h:30
@ LD_STORE_ERROR
Indicates an internal exception with the flag store.
Definition: variations.h:50
@ LD_ERROR
Indicates that the flag could not be evaluated, e.g. because it does not exist or due to an unexpecte...
Definition: variations.h:23
@ LD_CLIENT_NOT_SPECIFIED
Indicates that a NULL client was passed for the client parameter.
Definition: variations.h:58
LDBoolean inExperiment
Whether the evaluation was part of an experiment. Is true if the evaluation resulted in an experiment...
Definition: variations.h:88
@ LD_CLIENT_NOT_READY
Indicates that the caller tried to evaluate a flag before the client had successfully initialized.
Definition: variations.h:46
Public API associated with LDAllFlagsState.
void LDDetailsInit(struct LDDetails *const details)
Initialize details to a default value.
@ LD_OOM
Evaluation failed because the client ran out of memory.
Definition: variations.h:66
const char * LDEvalErrorKindToString(const enum LDEvalErrorKind kind)
Converts an LDEvalErrorKind enum to an equivalent string.
LDEvalReason
The reason an evaluation occurred.
Definition: variations.h:16
#define LD_EXPORT(x)
Used to ensure only intended symbols are exported in the binaries.
Definition: export.h:10
struct LDJSON * LDReasonToJSON(const struct LDDetails *const details)
Marshal just the evaluation reason portion of LDDetails to JSON.
unsigned int ruleIndex
The index of the rule that was matched.
Definition: variations.h:73
@ LD_TARGET_MATCH
Indicates that the user key was specifically targeted for this flag.
Definition: variations.h:33
@ LD_UNKNOWN
A default unset reason.
Definition: variations.h:19
@ LD_NULL_KEY
Indicates a NULL flag key was used.
Definition: variations.h:48
Definition: variations.h:91
struct LDJSON * LDJSONVariation(struct LDClient *const client, const struct LDUser *const user, const char *const key, const struct LDJSON *const fallback, struct LDDetails *const details)
Evaluate a JSON flag.
struct LDDetailsRule rule
when reason == LD_RULE_MATCH
Definition: variations.h:108
double LDDoubleVariation(struct LDClient *const client, const struct LDUser *const user, const char *const key, const double fallback, struct LDDetails *const details)
Evaluate a double flag.
enum LDEvalReason reason
The reason an evaluation occurred.
Definition: variations.h:100
@ LD_WRONG_TYPE
Indicates that the result value was not of the requested type, e.g. you called LDBoolVariation but th...
Definition: variations.h:64
char * prerequisiteKey
when reason == LD_PREREQUISITE_FAILED
Definition: variations.h:106
Public API Interface for User construction.
LDBoolean hasVariation
True if there is a variationIndex, false if the default value was returned.
Definition: variations.h:98
Public API Interface for JSON usage.
char * id
The unique identifier of the rule that was matched.
Definition: variations.h:75
@ LD_USER_NOT_SPECIFIED
Indicates that a NULL user was passed for the user parameter.
Definition: variations.h:55
enum LDEvalErrorKind errorKind
when reason == LD_ERROR
Definition: variations.h:104
const char * LDEvalReasonKindToString(const enum LDEvalReason kind)
Convert an LDEvalReason enum to an equivalent string.
union LDDetails::@0 extra
Extra information depending on the evaluation reason.
Indicates which rule matched a user.
Definition: variations.h:70
struct LDJSON * LDAllFlags(struct LDClient *const client, const struct LDUser *const user)
Returns a map from feature flag keys to values for a given user. This does not send analytics events ...
Public API for Client operations.
Public. Configuration of exported symbols.