Documentation ¶
Index ¶
- Variables
- type Lock
- type RedisConfig
- type RedisManager
- func (self *RedisManager) Brpop(key string, expire int64, result interface{}) error
- func (self *RedisManager) Client(dsname ...string) (*RedisManager, error)
- func (self *RedisManager) Del(key ...string) error
- func (self *RedisManager) Flush() error
- func (self *RedisManager) Get(key string, input interface{}) (bool, error)
- func (self *RedisManager) InitConfig(input ...RedisConfig) (*RedisManager, error)
- func (self *RedisManager) Keys(pattern ...string) ([]string, error)
- func (self *RedisManager) Put(key string, input interface{}, expire ...int) error
- func (self *RedisManager) Rpush(key string, input interface{}) error
- func (self *RedisManager) Size(pattern ...string) (int, error)
- func (self *RedisManager) TryLock(resource string, call func() error) error
- func (self *RedisManager) TryLockWithTimeout(resource string, timeout int, call func() error) error
- func (self *RedisManager) Values(pattern ...string) ([]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MASTER = "MASTER"
)
Functions ¶
This section is empty.
Types ¶
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock represents a held lock.
type RedisConfig ¶
type RedisConfig struct { DsName string Host string Port int Password string MaxIdle int MaxActive int IdleTimeout int Network string LockTimeout int }
redis配置参数
type RedisManager ¶
redis缓存管理器
func (*RedisManager) Brpop ¶ added in v1.0.51
func (self *RedisManager) Brpop(key string, expire int64, result interface{}) error
func (*RedisManager) Client ¶
func (self *RedisManager) Client(dsname ...string) (*RedisManager, error)
func (*RedisManager) Del ¶
func (self *RedisManager) Del(key ...string) error
func (*RedisManager) Flush ¶
func (self *RedisManager) Flush() error
func (*RedisManager) Get ¶
func (self *RedisManager) Get(key string, input interface{}) (bool, error)
func (*RedisManager) InitConfig ¶
func (self *RedisManager) InitConfig(input ...RedisConfig) (*RedisManager, error)
func (*RedisManager) Keys ¶
func (self *RedisManager) Keys(pattern ...string) ([]string, error)
数据量大时请慎用
func (*RedisManager) Put ¶
func (self *RedisManager) Put(key string, input interface{}, expire ...int) error
func (*RedisManager) Rpush ¶ added in v1.0.51
func (self *RedisManager) Rpush(key string, input interface{}) error
func (*RedisManager) TryLock ¶
func (self *RedisManager) TryLock(resource string, call func() error) error
func (*RedisManager) TryLockWithTimeout ¶
func (self *RedisManager) TryLockWithTimeout(resource string, timeout int, call func() error) error
func (*RedisManager) Values ¶
func (self *RedisManager) Values(pattern ...string) ([]interface{}, error)
数据量大时请慎用
Click to show internal directories.
Click to hide internal directories.