Documentation ¶
Index ¶
- Constants
- type Client
- type Hook
- func (h *Hook) AfterProcess(ctx context.Context, cmd redis.Cmder) error
- func (h *Hook) AfterProcessPipeline(_ context.Context, _ []redis.Cmder) error
- func (h *Hook) BeforeProcess(ctx context.Context, _ redis.Cmder) (context.Context, error)
- func (h *Hook) BeforeProcessPipeline(ctx context.Context, _ []redis.Cmder) (context.Context, error)
- type Option
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) Del(ctx context.Context, keys ...string) (val int, err error)
- func (r *Redis) Hdel(ctx context.Context, key string, fields ...string) (val bool, err error)
- func (r *Redis) Hgetall(ctx context.Context, key string) (val map[string]string, err error)
- func (r *Redis) Hmget(ctx context.Context, key string, fields ...string) (val []interface{}, err error)
- func (r *Redis) Hmset(ctx context.Context, key string, fieldsAndValues map[string]interface{}) error
- func (r *Redis) Hscan(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
- func (r *Redis) Hset(ctx context.Context, key, field string, value interface{}) error
- func (r *Redis) Llen(ctx context.Context, key string) (val int, err error)
- func (r *Redis) Lrange(ctx context.Context, key string, start, stop int) (val []string, err error)
- func (r *Redis) Lrem(ctx context.Context, key string, count int, value interface{}) (val int, err error)
- func (r *Redis) Lset(ctx context.Context, key string, index int64, value interface{}) (val string, err error)
- func (r *Redis) Ping(ctx context.Context) error
- func (r *Redis) Rpush(ctx context.Context, key string, values ...interface{}) (val int, err error)
- func (r *Redis) Scan(ctx context.Context, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
- type Type
Constants ¶
View Source
const ( NodeType = "ClusterType" ClusterType = "Type" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
func (*Hook) AfterProcessPipeline ¶
func (*Hook) BeforeProcess ¶
type Option ¶
type Option func(opt *option)
func WithClusterType ¶
func WithClusterType() Option
func WithNodeType ¶
func WithNodeType() Option
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) Hmget ¶
func (r *Redis) Hmget(ctx context.Context, key string, fields ...string) (val []interface{}, err error)
Hmget is the implementation of redis hmget command.
func (*Redis) Hmset ¶
func (r *Redis) Hmset(ctx context.Context, key string, fieldsAndValues map[string]interface{}) error
Hmset is the implementation of redis hmset command.
func (*Redis) Hscan ¶
func (r *Redis) Hscan(ctx context.Context, key string, cursor uint64, match string, count int64) (keys []string, cur uint64, err error)
Hscan is the implementation of redis hscan command.
func (*Redis) Lrem ¶
func (r *Redis) Lrem(ctx context.Context, key string, count int, value interface{}) (val int, err error)
Lrem is the implementation of redis lrem command.
func (*Redis) Lset ¶
func (r *Redis) Lset(ctx context.Context, key string, index int64, value interface{}) (val string, err error)
Lset is the implementation of redis lset command.
Click to show internal directories.
Click to hide internal directories.