Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisClient ¶
type RedisClient 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 JSONGet(ctx context.Context, key string, paths ...string) *redis.JSONCmd JSONSet(ctx context.Context, key, path string, value interface{}) *redis.StatusCmd JSONDel(ctx context.Context, key string, path string) *redis.IntCmd HSet(ctx context.Context, key string, values ...interface{}) *redis.IntCmd HGet(ctx context.Context, key, field string) *redis.StringCmd Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd Subscribe(ctx context.Context, channels ...string) *redis.PubSub Ping(ctx context.Context) *redis.StatusCmd }
func NewRedisClient ¶
func NewRedisClient(config RedisConfiguration, logger logging.Logger) RedisClient
NewRedisClient creates a new RedisClient (redis.Client) instance.
type RedisConfiguration ¶
type RedisConfiguration struct { // Address represents host:port list separated by , Address []string `envconfig:"REDIS_ADDRESS" required:"true"` InsecureSkipVerify bool `envconfig:"REDIS_INSECURE_SKIP_VERIFY" default:"false"` CACert string `envconfig:"REDIS_CA_CERT"` Cert string `envconfig:"REDIS_CERT"` CertKey string `envconfig:"REDIS_CERT_KEY"` }
RedisConfiguration represents the client configuration to connect to Prometheus.
func (*RedisConfiguration) LoadFromEnvVars ¶
func (c *RedisConfiguration) LoadFromEnvVars() error
LoadFromEnvVars for RedisConfiguration.
Click to show internal directories.
Click to hide internal directories.