Interface LDDataSystemOptionsExperimental

This feature is not stable and not subject to any backwards compatibility guarantees or semantic versioning. It is not suitable for production usage.

Configuration options for the Data System that the SDK uses to get and maintain flags and other data from LaunchDarkly and other sources.

Example (Recommended):

let dataSystemOptions = {
dataSource: {
dataSourceOptionsType: 'standard';
},
}

Example (Polling with DynamoDB Persistent Store):
```typescript
import { DynamoDBFeatureStore } from '@launchdarkly/node-server-sdk-dynamodb';

let dataSystemOptions = {
dataSource: {
dataSourceOptionsType: 'pollingOnly';
pollInterval: 300;
},
persistentStore: DynamoDBFeatureStore('your-table', { cacheTTL: 30 });
}
const client = init('my-sdk-key', { hooks: [new TracingHook()] });

Hierarchy

  • LDDataSystemOptions

Properties

dataSource?: DataSourceOptions

Configuration options for the Data Source that the SDK uses to get flags and other data from the LaunchDarkly servers. Choose one of StandardDataSourceOptions, StreamingDataSourceOptions, or PollingDataSourceOptions; setting the type and the optional fields you want to customize.

If not specified, this defaults to using the StandardDataSourceOptions which performs a combination of streaming and polling.

See LDDataSystemOptions documentation for examples.

persistentStore?: LDFeatureStore | ((clientContext) => LDFeatureStore)

Before data has arrived from LaunchDarkly, the SDK is able to evaluate flags using data from the persistent store. Once fresh data has arrived from LaunchDarkly, the SDK will no longer read from the persistent store, although it will keep it up-to-date for future startups.

Some implementations provide the store implementation object itself, while others provide a factory function that creates the store implementation based on the SDK configuration; this property accepts either.

Type declaration

Param

whose properties may be used to influence creation of the persistent store.

useLdd?: boolean

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.

Generated using TypeDoc