Documentation ¶
Index ¶
- type RedisPool
- func (*RedisPool) Clean()
- func (mine *RedisPool) Close(key string) error
- func (*RedisPool) Get(clientName, key string) (string, error)
- func (*RedisPool) GetClient(key string) (string, *redis.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 (*RedisPool) Once ¶
func (*RedisPool) Once(redisSetting *RedisSetting) *RedisPool
Once 单例化:redis 链接
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 RedisSet RedisSetting
func (RedisSetting) ExampleYaml ¶ added in v2.11.2
func (RedisSetting) ExampleYaml() string
ExampleYaml 示例配置文件
Click to show internal directories.
Click to hide internal directories.