How to use the launchdarkly-node-server-sdk.RedisFeatureStore function in launchdarkly-node-server-sdk

To help you get started, we’ve selected a few launchdarkly-node-server-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github launchdarkly / node-server-sdk / test-types.ts View on Github external
var flagSetValue: ld.LDFlagValue = flagSet['key'];
});

// evaluation methods with promises
client.variation('key', user, false).then((value: ld.LDFlagValue) => { });
client.variation('key', user, 2).then((value: ld.LDFlagValue) => { });
client.variation('key', user, 'default').then((value: ld.LDFlagValue) => { });
client.variationDetail('key', user, 'default').then((detail: ld.LDEvaluationDetail) => { });
client.allFlags(user).then((flagSet: ld.LDFlagSet) => { });

// Redis integration
var redisStore0 = ld.RedisFeatureStore();
var myRedisOpts: redis.ClientOpts = {};
var redisStore1 = ld.RedisFeatureStore(myRedisOpts, 30, 'prefix', logger);
var myRedisClient: redis.RedisClient = new redis.RedisClient(myRedisOpts);
var redisStore2 = ld.RedisFeatureStore(undefined, 30, 'prefix', logger, myRedisClient);
github launchdarkly / node-server-sdk / test-types.ts View on Github external
var detailIndex: number | undefined = detail.variationIndex;
  var detailReason: ld.LDEvaluationReason = detail.reason;  
});
client.allFlags(user, (flagSet: ld.LDFlagSet) =>  {
  var flagSetValue: ld.LDFlagValue = flagSet['key'];
});

// evaluation methods with promises
client.variation('key', user, false).then((value: ld.LDFlagValue) => { });
client.variation('key', user, 2).then((value: ld.LDFlagValue) => { });
client.variation('key', user, 'default').then((value: ld.LDFlagValue) => { });
client.variationDetail('key', user, 'default').then((detail: ld.LDEvaluationDetail) => { });
client.allFlags(user).then((flagSet: ld.LDFlagSet) => { });

// Redis integration
var redisStore0 = ld.RedisFeatureStore();
var myRedisOpts: redis.ClientOpts = {};
var redisStore1 = ld.RedisFeatureStore(myRedisOpts, 30, 'prefix', logger);
var myRedisClient: redis.RedisClient = new redis.RedisClient(myRedisOpts);
var redisStore2 = ld.RedisFeatureStore(undefined, 30, 'prefix', logger, myRedisClient);
github launchdarkly / node-server-sdk / test-types.ts View on Github external
});
client.allFlags(user, (flagSet: ld.LDFlagSet) =>  {
  var flagSetValue: ld.LDFlagValue = flagSet['key'];
});

// evaluation methods with promises
client.variation('key', user, false).then((value: ld.LDFlagValue) => { });
client.variation('key', user, 2).then((value: ld.LDFlagValue) => { });
client.variation('key', user, 'default').then((value: ld.LDFlagValue) => { });
client.variationDetail('key', user, 'default').then((detail: ld.LDEvaluationDetail) => { });
client.allFlags(user).then((flagSet: ld.LDFlagSet) => { });

// Redis integration
var redisStore0 = ld.RedisFeatureStore();
var myRedisOpts: redis.ClientOpts = {};
var redisStore1 = ld.RedisFeatureStore(myRedisOpts, 30, 'prefix', logger);
var myRedisClient: redis.RedisClient = new redis.RedisClient(myRedisOpts);
var redisStore2 = ld.RedisFeatureStore(undefined, 30, 'prefix', logger, myRedisClient);

launchdarkly-node-server-sdk

LaunchDarkly Server-Side SDK for Node.js

Apache-2.0
Latest version published 8 months ago

Package Health Score

58 / 100
Full package analysis