Documentation
¶
Index ¶
- type RedisCache
- func (r *RedisCache) Client() *redis.Client
- func (r *RedisCache) Delete(ctx context.Context, key string) error
- func (r *RedisCache) Exists(ctx context.Context, key string) (bool, error)
- func (r *RedisCache) Get(ctx context.Context, key string) (string, error)
- func (r *RedisCache) HealthChecks() []healthkit.Check
- func (r *RedisCache) Name() string
- func (r *RedisCache) Ready() <-chan struct{}
- func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
- func (r *RedisCache) Start(ctx context.Context) error
- func (r *RedisCache) Stop(ctx context.Context) error
- type RedisOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(ctx context.Context, options ...RedisOption) (*RedisCache, error)
func (*RedisCache) Client ¶
func (r *RedisCache) Client() *redis.Client
func (*RedisCache) HealthChecks ¶ added in v0.1.1
func (r *RedisCache) HealthChecks() []healthkit.Check
func (*RedisCache) Name ¶
func (r *RedisCache) Name() string
func (*RedisCache) Ready ¶
func (r *RedisCache) Ready() <-chan struct{}
type RedisOption ¶
type RedisOption func(*RedisCache)
func WithAddress ¶
func WithAddress(addr string) RedisOption
func WithDB ¶
func WithDB(db int) RedisOption
func WithName ¶
func WithName(name string) RedisOption
func WithPassword ¶
func WithPassword(password string) RedisOption
Click to show internal directories.
Click to hide internal directories.