Documentation ¶
Index ¶
- func NewRedisClient(opts ...Option) *redis.Client
- func NewRedisClusterClient(opts ...ClusterOption) *redis.ClusterClient
- type ClusterOption
- type Config
- type Option
- type XRedis
- func (xr *XRedis) ExistEX(ctx context.Context, key string, ttl time.Duration) error
- func (xr *XRedis) HGetXEX(ctx context.Context, key, field string, ttl time.Duration) (string, error)
- func (xr *XRedis) HIncrByXEX(ctx context.Context, key, field string, incr int64, ttl time.Duration) error
- func (xr *XRedis) HMGetXEX(ctx context.Context, key string, ttl time.Duration, field ...string) ([]interface{}, error)
- func (xr *XRedis) HMIncrByEX(ctx context.Context, key string, fieldMap map[string]int64, ttl time.Duration) error
- func (xr *XRedis) HMSetEX(ctx context.Context, key string, fieldMap map[string]interface{}, ...) error
- func (xr *XRedis) HMSetXEX(ctx context.Context, key string, fieldMap map[string]interface{}, ...) error
- func (xr *XRedis) IncrByXEX(ctx context.Context, key string, incr int64, ttl time.Duration) error
- func (xr *XRedis) ZAddEX(ctx context.Context, key string, zs []*redis.Z, ttl time.Duration) error
- func (xr *XRedis) ZAddXEX(ctx context.Context, key string, zs []*redis.Z, ttl time.Duration) error
- func (xr *XRedis) ZRevPageByMember(ctx context.Context, key string, member interface{}, offset int64) ([]interface{}, error)
- func (xr *XRedis) ZRevPageByMemberWithScores(ctx context.Context, key string, member interface{}, offset int64) ([]redis.Z, error)
- func (xr *XRedis) ZRevRangeByMember(ctx context.Context, key string, member interface{}, offset int64) ([]interface{}, error)
- func (xr *XRedis) ZRevRangeByMemberWithScores(ctx context.Context, key string, member interface{}, offset int64) ([]redis.Z, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisClient ¶ added in v0.0.3
func NewRedisClient(opts ...Option) *redis.Client
func NewRedisClusterClient ¶ added in v0.0.3
func NewRedisClusterClient(opts ...ClusterOption) *redis.ClusterClient
Types ¶
type ClusterOption ¶ added in v0.0.3
type ClusterOption func(*redis.ClusterOptions)
func WithClusterAddr ¶ added in v0.0.3
func WithClusterAddr(addr []string) ClusterOption
func WithClusterDialTimeout ¶ added in v0.0.3
func WithClusterDialTimeout(d time.Duration) ClusterOption
func WithClusterReadTimeout ¶ added in v0.0.3
func WithClusterReadTimeout(d time.Duration) ClusterOption
func WithClusterWriteTimeout ¶ added in v0.0.3
func WithClusterWriteTimeout(d time.Duration) ClusterOption
type Option ¶ added in v0.0.3
type Option func(*redis.Options)
func WithDialTimeout ¶ added in v0.0.3
func WithReadTimeout ¶ added in v0.0.3
func WithWriteTimeout ¶ added in v0.0.3
type XRedis ¶
type XRedis struct {
redis.Cmdable
}
func (*XRedis) HIncrByXEX ¶
func (*XRedis) HMIncrByEX ¶
func (*XRedis) ZRevPageByMember ¶ added in v0.0.7
func (*XRedis) ZRevPageByMemberWithScores ¶ added in v0.0.7
func (*XRedis) ZRevRangeByMember ¶
Click to show internal directories.
Click to hide internal directories.