Documentation
¶
Index ¶
- Constants
- func ClearConfig()
- func RemoveConfig(name ...string)
- func SetConfigByStr(str string, name ...string) error
- type Config
- type Conn
- type PoolStats
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) Conn() *Conn
- func (r *Redis) Do(command string, args ...interface{}) (interface{}, error)
- func (r *Redis) DoVar(command string, args ...interface{}) (*gvar.Var, error)
- func (r *Redis) GetConn() *Conn
- func (r *Redis) SetIdleTimeout(value time.Duration)
- func (r *Redis) SetMaxActive(value int)
- func (r *Redis) SetMaxConnLifetime(value time.Duration)
- func (r *Redis) SetMaxIdle(value int)
- func (r *Redis) Stats() *PoolStats
Constants ¶
View Source
const ( DEFAULT_GROUP_NAME = "default" DEFAULT_REDIS_PORT = 6379 )
Variables ¶
This section is empty.
Functions ¶
func ClearConfig ¶
func ClearConfig()
func RemoveConfig ¶
func RemoveConfig(name ...string)
func SetConfigByStr ¶
Types ¶
type Config ¶
type Config struct {
Host string
Port int
Db int
Passwd string
MaxIdle int
MaxActive int
IdleTimeout time.Duration
MaxConnLifetime time.Duration
ConnectTimeout time.Duration
}
func ConfigFromStr ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) SetIdleTimeout ¶
func (*Redis) SetMaxActive ¶
func (*Redis) SetMaxConnLifetime ¶
func (*Redis) SetMaxIdle ¶
Click to show internal directories.
Click to hide internal directories.