C++ Server-Side SDK Redis Source
Provide SDK data via Redis
|
LaunchDarkly Server-side Redis Source C Binding. More...
#include <launchdarkly/bindings/c/export.h>
Go to the source code of this file.
Classes | |
struct | LDServerLazyLoadRedisResult |
Stores the result of calling LDDServerLazyLoadRedisSource_New. More... | |
Macros | |
#define | LDSERVER_LAZYLOAD_REDISSOURCE_ERROR_MESSAGE_SIZE 256 |
Typedefs | |
typedef struct _LDServerLazyLoadRedisSource * | LDServerLazyLoadRedisSource |
LDServerLazyLoadRedisSource represents a data source for the Server-Side SDK backed by Redis. It is meant to be used in place of the standard LaunchDarkly Streaming or Polling data sources. More... | |
Functions | |
LDServerLazyLoadRedisSource_New (char const *uri, char const *prefix, struct LDServerLazyLoadRedisResult *out_result) | |
Creates a new Redis data source suitable for usage in the SDK's Lazy Load data system. More... | |
LDServerLazyLoadRedisSource_Free (LDServerLazyLoadRedisSource source) | |
Frees a Redis data source pointer. Only necessary to call if not passing ownership to SDK configuration. | |
LaunchDarkly Server-side Redis Source C Binding.
typedef struct _LDServerLazyLoadRedisSource* LDServerLazyLoadRedisSource |
LDServerLazyLoadRedisSource represents a data source for the Server-Side SDK backed by Redis. It is meant to be used in place of the standard LaunchDarkly Streaming or Polling data sources.
Call LDServerLazyLoadRedisSource_New to obtain a new instance. This instance can be passed into the SDK's DataSystem configuration via the LazyLoad builder.
Example:
This implementation is backed by Redis++, a C++ wrapper for the hiredis library.
LDServerLazyLoadRedisSource_New | ( | char const * | uri, |
char const * | prefix, | ||
struct LDServerLazyLoadRedisResult * | out_result | ||
) |
Creates a new Redis data source suitable for usage in the SDK's Lazy Load data system.
In this system, the SDK will query Redis for flag/segment data as required, with an in-memory cache to reduce the number of queries.
Data is never written back to Redis.
uri | Redis URI string. Must not be NULL or empty string. |
prefix | Prefix to use when reading SDK data from Redis. This allows multiple SDK environments to coexist in the same database, or for the SDK's data to coexist with other unrelated data. Must not be NULL. |
out_result | Pointer to struct where the source pointer or an error message should be stored. |