Documentation ¶
Index ¶
- Variables
- func RemovePool(name string)
- type Args
- type Argument
- type Conn
- type ConnWithTimeout
- type DialConfig
- type DialOption
- type ManagerConfig
- type Message
- type Pong
- type Pool
- type PoolConfig
- type PoolOption
- type PoolStats
- type PubSubConn
- type RedisConfig
- type Result
- func (h *Result) Bool() (bool, error)
- func (h *Result) ByteSlices() ([][]byte, error)
- func (h *Result) Bytes() ([]byte, error)
- func (h *Result) Error() error
- func (h *Result) Float64() (float64, error)
- func (h *Result) Float64s() ([]float64, error)
- func (h *Result) Int() (int, error)
- func (h *Result) Int64() (int64, error)
- func (h *Result) Int64Map() (map[string]int64, error)
- func (h *Result) Int64s() ([]int64, error)
- func (h *Result) IntMap() (map[string]int, error)
- func (h *Result) Interface() (interface{}, error)
- func (h *Result) Ints() ([]int, error)
- func (h *Result) IsNil() bool
- func (h *Result) MultiBulk() ([]interface{}, error)
- func (h *Result) Positions() ([]*[2]float64, error)
- func (h *Result) Reply() interface{}
- func (h *Result) String() (string, error)
- func (h *Result) StringMap() (map[string]string, error)
- func (h *Result) Strings() ([]string, error)
- func (h *Result) Uint64() (uint64, error)
- func (h *Result) Values() ([]interface{}, error)
- type Scanner
- type Script
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Password = "nlpteams" ConnectTimeout = "100ms" MaxIdle = 10 IdleTimeout = "1m" DefaultReidsConf = ManagerConfig{ Manager: []RedisConfig{ { Name: "graph", Network: "tcp", Host: "nlp-catch.codis.yzpsg2.in.autohome.com.cn:19383", DialConfig: &DialConfig{ Password: &Password, ConnectTimeout: &ConnectTimeout, ReadTimeout: &timeout, WriteTimeout: &timeout, }, PoolConfig: &PoolConfig{ MaxIdle: &MaxIdle, IdleTimeout: &IdleTimeout, }, }, }, } )
View Source
var Bool = _redis.Bool
View Source
var ByteSlices = _redis.ByteSlices
View Source
var Bytes = _redis.Bytes
View Source
var DialConnectTimeout = _redis.DialConnectTimeout
View Source
var DialDatabase = _redis.DialDatabase
View Source
var DialKeepAlive = _redis.DialKeepAlive
View Source
var DialNetDial = _redis.DialNetDial
View Source
var DialPassword = _redis.DialPassword
View Source
var DialReadTimeout = _redis.DialReadTimeout
View Source
var DialTLSConfig = _redis.DialTLSConfig
View Source
var DialTLSSkipVerify = _redis.DialTLSSkipVerify
View Source
var DialUseTLS = _redis.DialUseTLS
View Source
var DialWriteTimeout = _redis.DialWriteTimeout
View Source
var DoWithTimeout = _redis.DoWithTimeout
View Source
var Float64 = _redis.Float64
View Source
var Float64s = _redis.Float64s
View Source
var Int = _redis.Int
View Source
var Int64 = _redis.Int64
View Source
var Int64Map = _redis.Int64Map
View Source
var Int64s = _redis.Int64s
View Source
var IntMap = _redis.IntMap
View Source
var Ints = _redis.Ints
View Source
var MultiBulk = _redis.MultiBulk
View Source
var Positions = _redis.Positions
View Source
var ReceiveWithTimeout = _redis.ReceiveWithTimeout
View Source
var Scan = _redis.Scan
View Source
var ScanSlice = _redis.ScanSlice
View Source
var ScanStruct = _redis.ScanStruct
View Source
var String = _redis.String
View Source
var StringMap = _redis.StringMap
View Source
var Strings = _redis.Strings
View Source
var Uint64 = _redis.Uint64
View Source
var Values = _redis.Values
Functions ¶
func RemovePool ¶
func RemovePool(name string)
Types ¶
type ConnWithTimeout ¶
type ConnWithTimeout = _redis.ConnWithTimeout
type DialConfig ¶
type DialConfig struct { ConnectTimeout *string `yaml:"connect_timeout" toml:"connect_timeout"` Database *int `yaml:"database" toml:"database"` KeepAlive *string `yaml:"keep_alive" toml:"keep_alive"` Password *string `yaml:"password" toml:"password"` ReadTimeout *string `yaml:"read_timeout" toml:"read_timeout"` //TLSConfig TLSSkipVerify *bool `yaml:"tls_skip_verify" toml:"tls_skip_verify"` UseTLS *bool `yaml:"use_tls" toml:"use_tls"` WriteTimeout *string `yaml:"write_timeout" toml:"write_timeout"` }
func (*DialConfig) DialOptions ¶
func (h *DialConfig) DialOptions() []DialOption
type ManagerConfig ¶
type ManagerConfig struct {
Manager []RedisConfig `yaml:"manager" toml:"manager"`
}
type Pool ¶
func CreatePool ¶
func CreatePool(name string, network, host string, poolOptions []PoolOption, dialOptions []DialOption) (*Pool, error)
func GetPoolByAddr ¶
func (*Pool) DoWithRetry ¶
type PoolConfig ¶
type PoolConfig struct { MaxIdle *int `yaml:"max_idle" toml:"max_idle"` MaxActive *int `yaml:"max_active" toml:"max_active"` IdleTimeout *string `yaml:"idle_timeout" toml:"idle_timeout"` Wait *bool `yaml:"wait" toml:"wait"` MaxConnLifetime *string `yaml:"max_conn_lifetime" toml:"max_conn_lifetime"` }
func (*PoolConfig) PoolOptions ¶
func (h *PoolConfig) PoolOptions() []PoolOption
type PoolOption ¶
type PoolOption struct {
// contains filtered or unexported fields
}
func PoolIdleTimeout ¶
func PoolIdleTimeout(v time.Duration) PoolOption
func PoolMaxActive ¶
func PoolMaxActive(v int) PoolOption
func PoolMaxConnLifetime ¶
func PoolMaxConnLifetime(v time.Duration) PoolOption
func PoolMaxIdle ¶
func PoolMaxIdle(v int) PoolOption
func PoolWait ¶
func PoolWait(v bool) PoolOption
type PubSubConn ¶
type PubSubConn = _redis.PubSubConn
type RedisConfig ¶
type RedisConfig struct { Name string `yaml:"name" toml:"name"` Host string `yaml:"host" toml:"host"` Network string `yaml:"network" toml:"network"` PoolConfig *PoolConfig `yaml:"pool" toml:"pool"` DialConfig *DialConfig `yaml:"dial" toml:"dial"` }
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) ByteSlices ¶
type Subscription ¶
type Subscription = _redis.Subscription
Click to show internal directories.
Click to hide internal directories.