Documentation
¶
Index ¶
- type RedisPool
- func (*RedisPool) Clean()
- func (my *RedisPool) Close(key string) error
- func (*RedisPool) Get(clientName, key string) (string, error)
- func (*RedisPool) GetClient(key string) (string, *rds.Client)
- func (*RedisPool) Once(redisSetting *RedisSetting) *RedisPool
- func (*RedisPool) Set(clientName, key string, val any, exp time.Duration) (string, error)
- type RedisSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisPool ¶
type RedisPool struct {
// contains filtered or unexported fields
}
var (
RedisPoolApp RedisPool
)
func OnceRedisPool ¶ added in v1.2.4
func OnceRedisPool(redisSetting *RedisSetting) *RedisPool
OnceRedisPool 单例化:redis 链接
func (*RedisPool) Once ¶
func (*RedisPool) Once(redisSetting *RedisSetting) *RedisPool
type RedisSetting ¶
type RedisSetting struct { Host string `yaml:"host"` Port int `yaml:"port"` Password string `yaml:"password"` Prefix string `yaml:"prefix"` Pool []struct { Key string `yaml:"key"` Prefix string `yaml:"prefix"` DbNum int `yaml:"dbNum"` } }
var RedisSettingApp RedisSetting
Click to show internal directories.
Click to hide internal directories.