Documentation ¶
Index ¶
- Variables
- type Cache
- func (db *Cache) Client() Client
- func (db *Cache) Delete(key string) Result
- func (db *Cache) Exists(key string) Result
- func (db *Cache) Expire(key string, seconds interface{}) Result
- func (db *Cache) Get(key string) Result
- func (db *Cache) HGet(key string, hkey string) Result
- func (db *Cache) Hset(key string, hkey string, value interface{}) Result
- func (db *Cache) Incr(key string) Result
- func (db *Cache) Pipe(method func(c Conn) error) (result Result)
- func (db *Cache) Set(key string, val interface{}) Result
- func (db *Cache) SetWithExpire(key string, val interface{}, seconds interface{}) Result
- func (db *Cache) Smembers(key string) Result
- type Client
- type Config
- type Conn
- type Result
- func (result Result) Bool() (bool, error)
- func (result Result) ByteSlices() ([][]byte, error)
- func (result Result) Bytes() ([]byte, error)
- func (result Result) Error() error
- func (result Result) Float64() (float64, error)
- func (result Result) Float64s() ([]float64, error)
- func (result Result) Int() (int, error)
- func (result Result) Int64() (int64, error)
- func (result Result) Int64Map() (map[string]int64, error)
- func (result Result) Int64s() ([]int64, error)
- func (result Result) IntMap() (map[string]int, error)
- func (result Result) Ints() ([]int, error)
- func (result Result) Positions() ([]*[2]float64, error)
- func (result Result) Reply() interface{}
- func (result Result) SlowLogs() ([]redis.SlowLog, error)
- func (result Result) String() (string, error)
- func (result Result) StringMap() (map[string]string, error)
- func (result Result) Strings() ([]string, error)
- func (result Result) Uint64() (uint64, error)
- func (result Result) Uint64Map() (map[string]uint64, error)
- func (result Result) Uint64s() ([]uint64, error)
- func (result Result) Value() (interface{}, error)
- func (result Result) Values() ([]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNil = errors.New("redis returned nil")
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) SetWithExpire ¶
type Client ¶
type Config ¶
type Config struct { Addr string Username string Password string // Maximum number of idle connections in the pool. MaxIdle int // Maximum number of connections allocated by the pool at a given time. // When zero, there is no limit on the number of connections in the pool. MaxActive int // Close connections after remaining idle for this duration. If the value // is zero, then idle connections are not closed. Applications should set // the timeout to a value less than the server's timeout. IdleTimeout time.Duration // If Wait is true and the pool is at the MaxActive limit, then Get() waits // for a connection to be returned to the pool before returning. Wait bool // Close connections older than this duration. If the value is zero, then // the pool does not close connections based on age. MaxConnLifetime time.Duration ClientName string Database int }
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (Result) ByteSlices ¶
Click to show internal directories.
Click to hide internal directories.