This repository was archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
57 lines (50 loc) · 1.92 KB
/
index.d.ts
File metadata and controls
57 lines (50 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Type definitions for launchdarkly-node-server-sdk-consul
/**
* Interface for the Consul feature store component to be used with the LaunchDarkly SDK.
*
* See: https://docs.launchdarkly.com/sdk/features/storing-data
*/
declare module 'launchdarkly-node-server-sdk-consul' {
import { LDFeatureStore, LDLogger, LDOptions } from 'launchdarkly-node-server-sdk';
// note that the node-consul package does not have TypeScript definitions
/**
* Create a feature flag store backed by Consul.
*
* @returns
* A factory function that the SDK will use to create the data store. Put this value into the
* `featureStore` property of [[LDOptions]].
*/
export default function ConsulFeatureStore(
/**
* Options for configuring the feature store.
*/
options?: LDConsulOptions
): (config: LDOptions) => LDFeatureStore;
/**
* Options for configuring a ConsulFeatureStore.
*/
export interface LDConsulOptions {
/**
* Options to be passed to the Consul client constructor, as defined by the node-consul package.
* Commonly used options include "host" (hostname), "port", and "secure" (true to use HTTPS).
* For other options, see node-consul documentation here: https://github.com/silas/node-consul
*/
consulOptions?: object;
/**
* An optional namespace prefix for all keys stored in Consul. Use this if you are sharing
* the same Consul host between multiple clients that are for different LaunchDarkly
* environments, to avoid key collisions.
*/
prefix?: string;
/**
* The expiration time for local caching, in seconds. To disable local caching, set this to zero.
* If not specified, the default is 15 seconds.
*/
cacheTTL?: number;
/**
* A logger to be used for warnings and errors generated by the feature store. If not specified,
* it will use the SDK's logging configuration.
*/
logger?: LDLogger;
}
}