redis

package module
v0.0.0-...-f65a043 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2017 License: MIT Imports: 5 Imported by: 0

README

redis

Redis wrapper for github.com/garyburd/redigo

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConnectionURL = errors.New("Invalid connection URL")
)

Errors set

Functions

This section is empty.

Types

type ConnWrapper

type ConnWrapper struct {
	Conn redis.Conn
}

func (*ConnWrapper) Close

func (c *ConnWrapper) Close() error

func (*ConnWrapper) Del

func (c *ConnWrapper) Del(params ...interface{}) (int64, error)

func (*ConnWrapper) Do

func (c *ConnWrapper) Do(cmd string, params ...interface{}) (interface{}, error)

func (*ConnWrapper) Exists

func (c *ConnWrapper) Exists(params ...interface{}) (bool, error)

func (*ConnWrapper) Flush

func (c *ConnWrapper) Flush() error

func (*ConnWrapper) Get

func (c *ConnWrapper) Get(key string) (interface{}, error)

func (*ConnWrapper) GetBool

func (c *ConnWrapper) GetBool(key string) (bool, error)

func (*ConnWrapper) GetFloat64

func (c *ConnWrapper) GetFloat64(key string) (float64, error)

func (*ConnWrapper) GetInt64

func (c *ConnWrapper) GetInt64(key string) (int64, error)

func (*ConnWrapper) GetString

func (c *ConnWrapper) GetString(key string) (string, error)

func (*ConnWrapper) GetUint64

func (c *ConnWrapper) GetUint64(key string) (uint64, error)

func (*ConnWrapper) HincrByFloat64

func (c *ConnWrapper) HincrByFloat64(hash, key string, v float64) (float64, error)

func (*ConnWrapper) Incr

func (c *ConnWrapper) Incr(key string) (int64, error)

func (*ConnWrapper) IncrBy

func (c *ConnWrapper) IncrBy(key string, v int64) (int64, error)

func (*ConnWrapper) IncrByFloat64

func (c *ConnWrapper) IncrByFloat64(key string, v float64) (float64, error)

func (*ConnWrapper) MGet

func (c *ConnWrapper) MGet(params ...interface{}) error

func (*ConnWrapper) MGetCleanSlice

func (c *ConnWrapper) MGetCleanSlice(keys ...interface{}) ([]interface{}, error)

func (*ConnWrapper) MGetSlice

func (c *ConnWrapper) MGetSlice(keys ...interface{}) ([]interface{}, error)

func (*ConnWrapper) MSet

func (c *ConnWrapper) MSet(params ...interface{}) (interface{}, error)

func (*ConnWrapper) Receive

func (c *ConnWrapper) Receive() (interface{}, error)

func (*ConnWrapper) Send

func (c *ConnWrapper) Send(cmd string, params ...interface{}) error

func (*ConnWrapper) Set

func (c *ConnWrapper) Set(key string, v interface{}) error

func (*ConnWrapper) SetEx

func (c *ConnWrapper) SetEx(key string, expire uint64, v interface{}) error

type PoolWrapper

type PoolWrapper struct {
	Raw *redis.Pool
}

PoolWrapper object

func Pool

func Pool(name string) *PoolWrapper

Pool by name

func Register

func Register(name, server, password string, dbNumber, maxIdle, maxActive int, wait bool, idleTimeout time.Duration) *PoolWrapper

Register redis connection

func RegisterURL

func RegisterURL(name, sURL string) (*PoolWrapper, error)

RegisterURL connection

func (*PoolWrapper) ActiveCount

func (p *PoolWrapper) ActiveCount() int

ActiveCount of connections

func (*PoolWrapper) Close

func (p *PoolWrapper) Close() error

Close pool of connections

func (*PoolWrapper) Get

func (p *PoolWrapper) Get() ConnWrapper

Get wrapped connection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL