redisClient

package
v0.0.0-...-3bf2efb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2023 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterClient

type ClusterClient struct {
	Client *redis.ClusterClient
}

func (*ClusterClient) Add

func (r *ClusterClient) Add(key string, value interface{}, duration time.Duration) error

func (*ClusterClient) Del

func (r *ClusterClient) Del(key string) error

func (*ClusterClient) Expire

func (r *ClusterClient) Expire(key string, duration time.Duration) error

func (*ClusterClient) Get

func (r *ClusterClient) Get(key string, objPtr interface{}) error

func (*ClusterClient) HGet

func (r *ClusterClient) HGet(key string, field string, objPtr interface{}) error

func (*ClusterClient) HSet

func (r *ClusterClient) HSet(key string, field string, value interface{}) error

func (*ClusterClient) Incr

func (r *ClusterClient) Incr(key string) error

func (*ClusterClient) LIndex

func (r *ClusterClient) LIndex(key string, index int64) (string, error)

func (*ClusterClient) LPush

func (r *ClusterClient) LPush(key string, value interface{}) (error, int64)

func (*ClusterClient) LRange

func (r *ClusterClient) LRange(key string, start int64, stop int64) ([]string, error)

func (*ClusterClient) LRem

func (r *ClusterClient) LRem(key string, count int64, value interface{}) error

func (*ClusterClient) LSet

func (r *ClusterClient) LSet(key string, index int64, value interface{}) error

func (*ClusterClient) LTrim

func (r *ClusterClient) LTrim(key string, start int64, stop int64) error

func (*ClusterClient) Pipeline

func (r *ClusterClient) Pipeline() redis.Pipeliner

type FailoverClient

type FailoverClient struct {
	Client *redis.Client
}

func (*FailoverClient) Add

func (r *FailoverClient) Add(key string, value interface{}, duration time.Duration) error

func (*FailoverClient) Del

func (r *FailoverClient) Del(key string) error

func (*FailoverClient) Expire

func (r *FailoverClient) Expire(key string, duration time.Duration) error

func (*FailoverClient) Get

func (r *FailoverClient) Get(key string, objPtr interface{}) error

func (*FailoverClient) HGet

func (r *FailoverClient) HGet(key string, field string, objPtr interface{}) error

func (*FailoverClient) HSet

func (r *FailoverClient) HSet(key string, field string, value interface{}) error

func (*FailoverClient) Incr

func (r *FailoverClient) Incr(key string) error

func (*FailoverClient) LIndex

func (r *FailoverClient) LIndex(key string, index int64) (string, error)

func (*FailoverClient) LPush

func (r *FailoverClient) LPush(key string, value interface{}) (error, int64)

func (*FailoverClient) LRange

func (r *FailoverClient) LRange(key string, start int64, stop int64) ([]string, error)

func (*FailoverClient) LRem

func (r *FailoverClient) LRem(key string, count int64, value interface{}) error

func (*FailoverClient) LSet

func (r *FailoverClient) LSet(key string, index int64, value interface{}) error

func (*FailoverClient) LTrim

func (r *FailoverClient) LTrim(key string, start int64, stop int64) error

func (*FailoverClient) Pipeline

func (r *FailoverClient) Pipeline() redis.Pipeliner

type IRedisClient

type IRedisClient interface {
	Get(key string, objPtr interface{}) error
	Incr(key string) error
	Add(key string, value interface{}, duration time.Duration) error
	Del(key string) error
	Expire(key string, duration time.Duration) error
	LPush(key string, value interface{}) (error, int64)
	LRange(key string, start int64, stop int64) ([]string, error)
	LIndex(key string, index int64) (string, error)
	LSet(key string, index int64, value interface{}) error
	LRem(key string, count int64, value interface{}) error
	LTrim(key string, start int64, stop int64) error
	HSet(key string, field string, value interface{}) error
	HGet(key string, field string, objPtr interface{}) error
	Pipeline() redis.Pipeliner
	// contains filtered or unexported methods
}

func NewClusterClient

func NewClusterClient() IRedisClient

func NewFailoverClient

func NewFailoverClient() IRedisClient

func NewNormalClient

func NewNormalClient() IRedisClient

func NewRedisClient

func NewRedisClient() IRedisClient

type NormalClient

type NormalClient struct {
	Client *redis.Client
}

func (*NormalClient) Add

func (r *NormalClient) Add(key string, value interface{}, duration time.Duration) error

func (*NormalClient) Del

func (r *NormalClient) Del(key string) error

func (*NormalClient) Expire

func (r *NormalClient) Expire(key string, duration time.Duration) error

func (*NormalClient) Get

func (r *NormalClient) Get(key string, objPtr interface{}) error

func (*NormalClient) HGet

func (r *NormalClient) HGet(key string, field string, objPtr interface{}) error

func (*NormalClient) HSet

func (r *NormalClient) HSet(key string, field string, value interface{}) error

func (*NormalClient) Incr

func (r *NormalClient) Incr(key string) error

func (*NormalClient) LIndex

func (r *NormalClient) LIndex(key string, index int64) (string, error)

func (*NormalClient) LPush

func (r *NormalClient) LPush(key string, value interface{}) (error, int64)

func (*NormalClient) LRange

func (r *NormalClient) LRange(key string, start int64, stop int64) ([]string, error)

func (*NormalClient) LRem

func (r *NormalClient) LRem(key string, count int64, value interface{}) error

func (*NormalClient) LSet

func (r *NormalClient) LSet(key string, index int64, value interface{}) error

func (*NormalClient) LTrim

func (r *NormalClient) LTrim(key string, start int64, stop int64) error

func (*NormalClient) Pipeline

func (r *NormalClient) Pipeline() redis.Pipeliner

type RedisClient

type RedisClient struct {
	Client IRedisClient
}

func (*RedisClient) Add

func (r *RedisClient) Add(key string, value interface{}, duration time.Duration) error

func (*RedisClient) Del

func (r *RedisClient) Del(key string) error

func (*RedisClient) Expire

func (r *RedisClient) Expire(key string, duration time.Duration) error

func (*RedisClient) Get

func (r *RedisClient) Get(key string, objPtr interface{}) error

func (*RedisClient) HGet

func (r *RedisClient) HGet(key string, field string, objPtr interface{}) error

func (*RedisClient) HSet

func (r *RedisClient) HSet(key string, field string, value interface{}) error

func (*RedisClient) LIndex

func (r *RedisClient) LIndex(key string, index int64) (string, error)

func (*RedisClient) LPush

func (r *RedisClient) LPush(key string, value interface{}) (error, int64)

func (*RedisClient) LRange

func (r *RedisClient) LRange(key string, start int64, stop int64) ([]string, error)

func (*RedisClient) LRem

func (r *RedisClient) LRem(key string, count int64, value interface{}) error

func (*RedisClient) LSet

func (r *RedisClient) LSet(key string, index int64, value interface{}) error

func (*RedisClient) LTrim

func (r *RedisClient) LTrim(key string, start int64, stop int64) error

func (*RedisClient) Pipeline

func (r *RedisClient) Pipeline() redis.Pipeliner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL