Documentation
¶
Index ¶
- type RedisFeatureStore
- func NewRedisFeatureStore(host string, port int, prefix string, timeout time.Duration) *RedisFeatureStore
- func NewRedisFeatureStoreFromUrl(url, prefix string, timeout time.Duration) *RedisFeatureStore
- func NewRedisFeatureStoreWithPool(pool *r.Pool, prefix string, timeout time.Duration) *RedisFeatureStore
- func (store *RedisFeatureStore) All() (map[string]*ld.Feature, error)
- func (store *RedisFeatureStore) Delete(key string, version int) error
- func (store *RedisFeatureStore) Get(key string) (*ld.Feature, error)
- func (store *RedisFeatureStore) Init(features map[string]*ld.Feature) error
- func (store *RedisFeatureStore) Initialized() bool
- func (store *RedisFeatureStore) Upsert(key string, f ld.Feature) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisFeatureStore ¶
type RedisFeatureStore struct {
// contains filtered or unexported fields
}
A Redis-backed feature store.
func NewRedisFeatureStore ¶
func NewRedisFeatureStore(host string, port int, prefix string, timeout time.Duration) *RedisFeatureStore
Constructs a new Redis-backed feature store connecting to the specified host and port with a default connection pool configuration (16 concurrent connections, connection requests block). Attaches a prefix string to all keys to namespace LaunchDarkly-specific keys. If the specified prefix is the empty string, it defaults to "launchdarkly"
func NewRedisFeatureStoreFromUrl ¶
func NewRedisFeatureStoreFromUrl(url, prefix string, timeout time.Duration) *RedisFeatureStore
Constructs a new Redis-backed feature store connecting to the specified URL with a default connection pool configuration (16 concurrent connections, connection requests block). Attaches a prefix string to all keys to namespace LaunchDarkly-specific keys. If the specified prefix is the empty string, it defaults to "launchdarkly".
func NewRedisFeatureStoreWithPool ¶
func NewRedisFeatureStoreWithPool(pool *r.Pool, prefix string, timeout time.Duration) *RedisFeatureStore
Constructs a new Redis-backed feature store with the specified redigo pool configuration. Attaches a prefix string to all keys to namespace LaunchDarkly-specific keys. If the specified prefix is the empty string, it defaults to "launchdarkly".
func (*RedisFeatureStore) All ¶
func (store *RedisFeatureStore) All() (map[string]*ld.Feature, error)
func (*RedisFeatureStore) Delete ¶
func (store *RedisFeatureStore) Delete(key string, version int) error
func (*RedisFeatureStore) Get ¶
func (store *RedisFeatureStore) Get(key string) (*ld.Feature, error)
func (*RedisFeatureStore) Init ¶
func (store *RedisFeatureStore) Init(features map[string]*ld.Feature) error
func (*RedisFeatureStore) Initialized ¶
func (store *RedisFeatureStore) Initialized() bool