Documentation ¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) Del(key string)
- func (c *Client) DelMulti(keys []string)
- func (c *Client) GetConn() *redis.Client
- func (c *Client) HGet(key, field string) (string, bool)
- func (c *Client) HGetAll(key string) map[string]string
- func (c *Client) HIncrBy(key, field string, inc int64) int64
- type ClientOptions
- type Clientv2
- func (c *Clientv2) Close()
- func (c *Clientv2) HGet(key, field string) string
- func (c *Clientv2) HIncrBy(key, field string, inc int64)
- func (c *Clientv2) HIncrByFloat(key, field string, inc float64)
- func (c *Clientv2) SAdd(key, field string) int
- func (c *Clientv2) SCard(key string) int
- func (c *Clientv2) SIsMember(key, val string) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct holds connection to redis
func NewClient ¶
func NewClient(opts *ClientOptions) *Client
NewClient method will return a pointer to new client object
func (*Client) GetConn ¶
func (c *Client) GetConn() *redis.Client
GetConn returns a pointer to the underlying redis library
type ClientOptions ¶
type ClientOptions struct { Host string Port string Password string MaxRetries int MinRetryBackOff time.Duration MaxRetryBackOff time.Duration WriteTimeout time.Duration DB int PoolSize int }
ClientOptions struct contains the options for connecting to redis
type Clientv2 ¶
type Clientv2 struct {
// contains filtered or unexported fields
}
Clientv2 struct holds pool connection to redis using radix dep
func NewV2Client ¶
func NewV2Client(opts *ClientOptions) *Clientv2
NewV2Client will return the pool connection to radix object
func (*Clientv2) HIncrByFloat ¶
HIncrByFloat will increment a hash map key
Click to show internal directories.
Click to hide internal directories.