Describes the reason that a flag evaluation produced a particular value. This is part of the LDEvaluationDetail object returned by LDElectronMainClient.variationDetail or LDElectronRendererClient.variationDetail.
Will be null when <a href="interfaces/_launchdarkly_electron_client_sdk_.ldoptions.html#evaluationreasons">LDOptions.evaluationReasons</a>
is false
.
The types of values a feature flag can have.
Flags can have any JSON-serializable value.
Logging levels that can be used with [[basicLogger]].
Set BasicLoggerOptions.level to one of these values to control what levels
of log messages are enabled. Going from lowest importance (and most verbose)
to most importance, the levels are 'debug'
, 'info'
, 'warn'
, and 'error'
.
You can also specify 'none'
instead to disable all logging.
The current version string of the SDK.
A basic implementation of logging that uses the global console
object. This is used by
default in the browser SDK. It sends messages of "debug", "info", "warn", or "error"
level (if enable) to console.log()
, console.info()
, console.warn()
, and console.error()
respectively.
To make LDClient use this logger, put it in the logger
property of LDOptions.
Wraps an instance of the LaunchDarkly Electron main-process client with an alternate interface that is the same as the LaunchDarkly Node SDK. This is intended to make it easier to port LaunchDarkly-enabled Node.js code to Electron.
An instance of LDElectronMainClient created with initializeInMain.
An instance of LDElectronNodeAdapterClient that controls the same SDK client.
Creates an instance of the LaunchDarkly Electron client to be used in the main process.
Applications should instantiate a single instance for the lifetime of the application.
The client will begin attempting to connect to LaunchDarkly as soon as it is created. To
determine when it is ready to use, call LDElectronMainClient.waitForInitialization, or register an
event listener for the "ready"
event using LDElectronMainClient.on.
The LaunchDarkly environment ID.
The initial user properties. These can be changed later with LDElectronMainClient.identify.
Optional configuration settings.
Creates an instance of the LaunchDarkly Electron client to be used in a renderer process, which will receive all of its state from a client in the main process.
The LaunchDarkly environment ID. This can usually be omitted because it can be obtained from the LDElectronMainClient instance in the main process. You only need to specify it here if there are multiple client instances with different environment IDs.
Optional configuration settings. Since the main process client controls all communication with
LaunchDarkly, the only options that can actually be set for the renderer client are the ones that
control event generation: sendEvents
, allAttributesPrivate
, privateAttributeNames
,
inlineUsersInEvents,
allowFrequentDuplicateEvents, and
sendEventsOnlyForVariation`.
Generated using TypeDoc
This is the API reference for the LaunchDarkly SDK for Electron.
In typical usage, you will call initializeInMain in the main process at startup time to obtain an instance of LDElectronMainClient-- and, optionally, call initializeInRenderer in a renderer process to obtain a corresponding instance of LDElectronRendererClient.
For more information, see the SDK reference guide.