Documentation ¶
Index ¶
- Constants
- type TRedisClient
- func (Self *TRedisClient) Del(key string) (bool, error)
- func (Self *TRedisClient) Exists(key string) bool
- func (Self *TRedisClient) Get(key string) (string, error)
- func (rp *TRedisClient) GetClient() *rediss.ClusterClient
- func (Self *TRedisClient) GetExpire(key string) (time.Duration, error)
- func (Self *TRedisClient) GetHead() string
- func (rp *TRedisClient) Init(cfgStr string) error
- func (rp *TRedisClient) Pub(topic, msg string) (int64, error)
- func (Self *TRedisClient) Set(key string, value string, args ...interface{}) (bool, error)
- func (Self *TRedisClient) SetHead(head string)
- func (rp *TRedisClient) Sub(topic string) *rediss.PubSub
Constants ¶
View Source
const ( ConnTimeout = time.Second * 3 OperTimeout = time.Second * 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TRedisClient ¶
type TRedisClient struct { SavePath string `json:"save_path"` Poolsize int `json:"poolsize"` Password string `json:"password"` DbNum int `json:"db_num"` IdleTimeoutStr string `json:"idle_timeout"` IdleCheckFrequencyStr string `json:"idle_check_frequency"` MaxRetries int `json:"max_retries"` // contains filtered or unexported fields }
func (*TRedisClient) Get ¶
func (Self *TRedisClient) Get(key string) (string, error)
*
- Get Single Key
func (*TRedisClient) GetClient ¶
func (rp *TRedisClient) GetClient() *rediss.ClusterClient
func (*TRedisClient) GetExpire ¶
func (Self *TRedisClient) GetExpire(key string) (time.Duration, error)
*
- GetExpire Single Key
func (*TRedisClient) GetHead ¶
func (Self *TRedisClient) GetHead() string
func (*TRedisClient) Init ¶
func (rp *TRedisClient) Init(cfgStr string) error
func (*TRedisClient) Set ¶
func (Self *TRedisClient) Set(key string, value string, args ...interface{}) (bool, error)
*
- Set Value
func (*TRedisClient) SetHead ¶
func (Self *TRedisClient) SetHead(head string)
Click to show internal directories.
Click to hide internal directories.