Documentation
¶
Index ¶
- type RedisClientInterface
- type RedisStore
- func (r *RedisStore) Close() error
- func (r *RedisStore) Delete(ctx context.Context, key string) error
- func (r *RedisStore) Get(ctx context.Context, key string) (*core.FeatureFlag, error)
- func (r *RedisStore) GetAll(ctx context.Context) ([]core.FeatureFlag, error)
- func (r *RedisStore) HealthCheck(ctx context.Context) error
- func (r *RedisStore) Set(ctx context.Context, flag core.FeatureFlag) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClientInterface ¶
type RedisClientInterface interface {
Get(ctx context.Context, key string) *redis.StringCmd
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd
Del(ctx context.Context, keys ...string) *redis.IntCmd
Keys(ctx context.Context, pattern string) *redis.StringSliceCmd
Pipeline() redis.Pipeliner
Ping(ctx context.Context) *redis.StatusCmd
Close() error
}
RedisClientInterface defines the Redis operations we need
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
RedisStore implements the Store interface using Redis as the backend
func NewStore ¶
func NewStore(config *config.RedisConfig) (*RedisStore, error)
NewRedisStore creates a new Redis store with the given configuration
func (*RedisStore) Delete ¶
func (r *RedisStore) Delete(ctx context.Context, key string) error
Delete removes a feature flag
func (*RedisStore) Get ¶
func (r *RedisStore) Get(ctx context.Context, key string) (*core.FeatureFlag, error)
Get retrieves a feature flag by key
func (*RedisStore) GetAll ¶
func (r *RedisStore) GetAll(ctx context.Context) ([]core.FeatureFlag, error)
GetAll retrieves all feature flags
func (*RedisStore) HealthCheck ¶
func (r *RedisStore) HealthCheck(ctx context.Context) error
HealthCheck verifies store connectivity
func (*RedisStore) Set ¶
func (r *RedisStore) Set(ctx context.Context, flag core.FeatureFlag) error
Set creates or updates a feature flag
Click to show internal directories.
Click to hide internal directories.