Documentation ¶
Index ¶
- Constants
- type RedisCli
- func (p *RedisCli) Decr(pool, key string) (string, error)
- func (p *RedisCli) DecrBy(key string, count int64) (int64, error)
- func (p *RedisCli) Delete(key string) error
- func (p *RedisCli) Exists(key string) bool
- func (p *RedisCli) Expire(key string, expire time.Duration) bool
- func (p *RedisCli) Get(key string) (string, error)
- func (p *RedisCli) Incr(key string) (string, error)
- func (p *RedisCli) IncrBy(key string, count int64) (int64, error)
- func (p *RedisCli) LPop(key string) (string, error)
- func (p *RedisCli) LRange(key string, begin, end int) ([]string, error)
- func (p *RedisCli) RPush(key string, value ...string) (int64, error)
- func (p *RedisCli) Set(key, value string, expireTime time.Duration) error
- func (p *RedisCli) SetNX(key, value string, expireTime time.Duration) error
- func (p *RedisCli) TTL(key string) (int, error)
- type RedisFactory
Constants ¶
View Source
const ( DEFAULT_MAX_CONN = 3500 DEFAULT_MAX_IDEL_CONN = 3000 DEFAULT_IDEL_TIMEOUT = 300 * time.Second // 300 time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCli ¶
type RedisCli struct {
RedisPool *redis.Client
}
RedisCli redis cli instance
type RedisFactory ¶
RedisFactory struct
var (
Factory RedisFactory
)
func (*RedisFactory) CreateRedisCli ¶
func (p *RedisFactory) CreateRedisCli(pwd, url string) (*RedisCli, error)
CreateRedisCli func create redis cli
Click to show internal directories.
Click to hide internal directories.