Documentation ¶
Overview ¶
*
- @Author: kwens
- @Date: 2022-11-15 16:53:02
- @Description:
*
- @Author: kwens
- @Date: 2022-11-15 16:51:47
- @Description:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Addr string `json:"addr"` Port int `json:"port"` Password string `json:"password"` DB int `json:"db"` MaxIdle int `json:"max_idle"` MaxActive int `json:"max_active"` IdleTimeout int `json:"idle_timeout"` Wait bool `json:"wait"` MaxConnLifeTime int `json:"max_conn_life_time"` BaseKey string `json:"base_key"` }
Config 配置结构
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithRedisConfig ¶
type Redis ¶
type Redis interface { Get(key string, result interface{}) (err error) GetDel(key string, result interface{}) (err error) Set(key string, value interface{}) (err error) SetEx(key string, value interface{}, ex int) (err error) GetSet(key string, result interface{}, value interface{}) (err error) ExistsDel(key string) (exists bool, err error) Del(key string) (err error) Exists(key string) (exists bool, err error) Incr(key string) (result int, err error) IncrEx(key string, ex int) (result int, err error) TTL(key string) (result int, err error) LLen(key string) (result int, err error) RPush(key string, value interface{}) (newLen int, err error) RPushX(key string, value interface{}) (newLen int, err error) LPop(key string, result interface{}) error BLPop(keys []string, timeout int, result interface{}) (key string, err error) ScanAll(match string, count ...int) (keys []string, err error) }
Click to show internal directories.
Click to hide internal directories.