Options
All
  • Public
  • Public/Protected
  • All
Menu

LaunchDarkly initialization options.

Hierarchy

  • LDOptions

Index

Properties

Optional allAttributesPrivate

allAttributesPrivate: undefined | false | true

Whether all user attributes (except the user key) should be marked as private, and not sent to LaunchDarkly.

By default, this is false.

Optional baseUri

baseUri: undefined | string

The base URI for the LaunchDarkly server.

Most users should use the default value.

Optional capacity

capacity: undefined | number

The capacity of the analytics events queue.

The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the buffer is flushed, events will be discarded.

Optional eventsUri

eventsUri: undefined | string

The base URI for the LaunchDarkly events server.

Most users should use the default value.

Optional featureStore

featureStore: LDFeatureStore

A component that stores feature flags and related data received from LaunchDarkly.

By default, this is an in-memory data structure. The SDK also provides a Redis implementation (RedisFeatureStore); other options are described in the SDK reference guide.

Optional flushInterval

flushInterval: undefined | number

The interval in between flushes of the analytics events queue, in seconds.

Optional logger

logger: LDLogger | object

Configures a logger for warnings and errors generated by the SDK.

This can be a custom logger or an instance of winston.Logger.

Optional offline

offline: undefined | false | true

Whether the client should be initialized in offline mode.

Optional pollInterval

pollInterval: undefined | number

The time between polling requests, in seconds. Ignored in streaming mode.

Optional privateAttributeNames

privateAttributeNames: Array<string>

The names of any user attributes that should be marked as private, and not sent to LaunchDarkly.

Optional proxyAuth

proxyAuth: undefined | string

Allows you to specify basic authentication parameters for an optional HTTP proxy. Usually of the form username:password.

Optional proxyHost

proxyHost: undefined | string

Allows you to specify a host for an optional HTTP proxy.

Optional proxyPort

proxyPort: undefined | number

Allows you to specify a port for an optional HTTP proxy.

Both the host and port must be specified to enable proxy support.

Optional proxyScheme

proxyScheme: undefined | string

When using an HTTP proxy, specifies whether it is accessed via http or https.

Optional sendEvents

sendEvents: undefined | false | true

Whether to send analytics events back to LaunchDarkly. By default, this is true.

Optional stream

stream: undefined | false | true

Whether streaming mode should be used to receive flag updates.

This is true by default. If you set it to false, the client will use polling. Streaming should only be disabled on the advice of LaunchDarkly support.

Optional streamUri

streamUri: undefined | string

The base URI for the LaunchDarkly streaming server.

Most users should use the default value.

Optional timeout

timeout: undefined | number

The connection timeout, in seconds.

Optional tlsParams

tlsParams: LDTLSOptions

Additional parameters to pass to the Node HTTPS API for secure requests. These can include any of the TLS-related parameters supported by https.request(), such as ca, cert, and key.

For more information, see the Node documentation for https.request() and tls.connect().

Optional updateProcessor

updateProcessor: undefined | object

A component that obtains feature flag data and puts it in the feature store.

By default, this is the client's default streaming or polling component. It can be changed for testing purposes; see FileDataSource.

Optional useLdd

useLdd: undefined | false | true

Whether you are using the LaunchDarkly relay proxy in daemon mode.

In this configuration, the client will not connect to LaunchDarkly to get feature flags, but will instead get feature state from a database (Redis or another supported feature store integration) that is populated by the relay. By default, this is false.

Optional userKeysCapacity

userKeysCapacity: undefined | number

The number of user keys that the event processor can remember at any one time, so that duplicate user details will not be sent in analytics events.

Defaults to 1000.

Optional userKeysFlushInterval

userKeysFlushInterval: undefined | number

The interval (in seconds) at which the event processor will reset its set of known user keys.

Defaults to 300.

Generated using TypeDoc