Documentation
      ¶
    
    
  
    
  
    Index ¶
- type Client
 - func (c *Client) Close()
 - func (c *Client) Del(key string)
 - func (c *Client) DelMulti(keys []string)
 - func (c *Client) Expire(key string, expiration time.Duration)
 - func (c *Client) Get(key string) (string, bool)
 - func (c *Client) GetConn() *redis.Client
 - func (c *Client) HDel(key string, field string)
 - func (c *Client) HDelMulti(key string, field []string)
 - 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
 - func (c *Client) HIncrByFloat(key, field string, inc float64) float64
 - func (c *Client) HSet(key string, field string, value string)
 - func (c *Client) Hlen(key string) int64
 - func (c *Client) Hmset(key string, hashdata map[string]interface{})
 - func (c *Client) Keys(pattern string) *redis.StringSliceCmd
 - func (c *Client) Set(key, field string, expiration time.Duration)
 
- type ClientOptions
 - type Clientv2
 
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
func (*Client) HDelMulti ¶ added in v1.0.7
DelMulti method will remove multiple keys from redis hash
func (*Client) HIncrByFloat ¶
HIncrByFloat will increment a hash map key
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.