Documentation
¶
Index ¶
- func CacheWithRedis(reg *register.Register)
- func CacheWithRedisCluster(reg *register.Register)
- type RedisClusterComponent
- func (rds *RedisClusterComponent) Del(key string) error
- func (rds *RedisClusterComponent) Exists(key string) bool
- func (rds *RedisClusterComponent) Expire(key string, expiration time.Duration) error
- func (rds *RedisClusterComponent) Get(key string) (string, error)
- func (rds *RedisClusterComponent) HDel(key, field string) error
- func (rds *RedisClusterComponent) HExists(key, field string) bool
- func (rds *RedisClusterComponent) HGet(key, field string) (string, error)
- func (rds *RedisClusterComponent) HGetALl(key, field string) (map[string]string, error)
- func (rds *RedisClusterComponent) HSet(key, field string, value interface{}) error
- func (rds *RedisClusterComponent) Init() error
- func (rds *RedisClusterComponent) LPop(key string) (string, error)
- func (rds *RedisClusterComponent) LPush(key string, values ...interface{}) error
- func (rds *RedisClusterComponent) Name() string
- func (rds *RedisClusterComponent) RPop(key string) (string, error)
- func (rds *RedisClusterComponent) Ready()
- func (rds *RedisClusterComponent) Set(key string, value interface{}, expiration ...time.Duration) error
- type RedisComponent
- func (rds *RedisComponent) Del(key string) error
- func (rds *RedisComponent) Exists(key string) bool
- func (rds *RedisComponent) Expire(key string, expiration time.Duration) error
- func (rds *RedisComponent) Get(key string) (string, error)
- func (rds *RedisComponent) HDel(key, field string) error
- func (rds *RedisComponent) HExists(key, field string) bool
- func (rds *RedisComponent) HGet(key, field string) (string, error)
- func (rds *RedisComponent) HGetALl(key, field string) (map[string]string, error)
- func (rds *RedisComponent) HSet(key, field string, value interface{}) error
- func (rds *RedisComponent) Init() error
- func (rds *RedisComponent) LPop(key string) (string, error)
- func (rds *RedisComponent) LPush(key string, values ...interface{}) error
- func (rds *RedisComponent) Name() string
- func (rds *RedisComponent) RPop(key string) (string, error)
- func (rds *RedisComponent) Ready()
- func (rds *RedisComponent) Set(key string, value interface{}, expiration ...time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheWithRedis ¶
func CacheWithRedisCluster ¶
Types ¶
type RedisClusterComponent ¶
type RedisClusterComponent struct { URLs []string `toml:"urls" json:"urls"` Username string `toml:"username" json:"username"` Password string `toml:"password" json:"password"` PoolSize int `toml:"pool_size" json:"pool_size"` PoolTimeout int `toml:"pool_timeout" json:"pool_timeout"` // contains filtered or unexported fields }
func (*RedisClusterComponent) Del ¶
func (rds *RedisClusterComponent) Del(key string) error
func (*RedisClusterComponent) Exists ¶
func (rds *RedisClusterComponent) Exists(key string) bool
func (*RedisClusterComponent) Expire ¶
func (rds *RedisClusterComponent) Expire(key string, expiration time.Duration) error
func (*RedisClusterComponent) Get ¶
func (rds *RedisClusterComponent) Get(key string) (string, error)
func (*RedisClusterComponent) HDel ¶
func (rds *RedisClusterComponent) HDel(key, field string) error
func (*RedisClusterComponent) HExists ¶
func (rds *RedisClusterComponent) HExists(key, field string) bool
func (*RedisClusterComponent) HGet ¶
func (rds *RedisClusterComponent) HGet(key, field string) (string, error)
func (*RedisClusterComponent) HGetALl ¶
func (rds *RedisClusterComponent) HGetALl(key, field string) (map[string]string, error)
func (*RedisClusterComponent) HSet ¶
func (rds *RedisClusterComponent) HSet(key, field string, value interface{}) error
------- Hash --------
func (*RedisClusterComponent) Init ¶
func (rds *RedisClusterComponent) Init() error
func (*RedisClusterComponent) LPop ¶
func (rds *RedisClusterComponent) LPop(key string) (string, error)
func (*RedisClusterComponent) LPush ¶
func (rds *RedisClusterComponent) LPush(key string, values ...interface{}) error
------- LIST --------
func (*RedisClusterComponent) Name ¶
func (rds *RedisClusterComponent) Name() string
func (*RedisClusterComponent) RPop ¶
func (rds *RedisClusterComponent) RPop(key string) (string, error)
func (*RedisClusterComponent) Ready ¶
func (rds *RedisClusterComponent) Ready()
type RedisComponent ¶
type RedisComponent struct { Addr string `toml:"addr" json:"addr"` Username string `toml:"username" json:"username"` Password string `toml:"password" json:"password"` PoolSize int `toml:"pool_size" json:"pool_size"` PoolTimeout int `toml:"pool_timeout" json:"pool_timeout"` // contains filtered or unexported fields }
func (*RedisComponent) Del ¶
func (rds *RedisComponent) Del(key string) error
func (*RedisComponent) Exists ¶
func (rds *RedisComponent) Exists(key string) bool
func (*RedisComponent) Expire ¶
func (rds *RedisComponent) Expire(key string, expiration time.Duration) error
func (*RedisComponent) HDel ¶
func (rds *RedisComponent) HDel(key, field string) error
func (*RedisComponent) HExists ¶
func (rds *RedisComponent) HExists(key, field string) bool
func (*RedisComponent) HGetALl ¶
func (rds *RedisComponent) HGetALl(key, field string) (map[string]string, error)
func (*RedisComponent) HSet ¶
func (rds *RedisComponent) HSet(key, field string, value interface{}) error
------- Hash --------
func (*RedisComponent) Init ¶
func (rds *RedisComponent) Init() error
func (*RedisComponent) LPush ¶
func (rds *RedisComponent) LPush(key string, values ...interface{}) error
------- LIST --------
func (*RedisComponent) Name ¶
func (rds *RedisComponent) Name() string
func (*RedisComponent) Ready ¶
func (rds *RedisComponent) Ready()
Click to show internal directories.
Click to hide internal directories.