rddb

package
v0.0.0-...-d6bd8d2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_NOT_INITED = errors.New("Redis is not initialized!")
	ERR_NOT_CONFIG = errors.New("Redis is not register!")
)
View Source
var (
	ErrNil           = redis.ErrNil
	ErrPoolExhausted = redis.ErrPoolExhausted
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string
	Port     string
	Password string
	MaxIdle  int
}

func NewConfig

func NewConfig(host, port, password string) *Config

func NewConfigSimple

func NewConfigSimple(password string) *Config

func NewFullConfig

func NewFullConfig(host, port, password string, idle int) *Config

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(c *Config) *DB

func NewDataBase

func NewDataBase(c *Config) (*DB, error)

func (*DB) Close

func (s *DB) Close() error

func (*DB) Do

func (s *DB) Do(commandName string, args ...interface{}) (reply interface{}, err error)

func (*DB) Err

func (s *DB) Err() error

func (*DB) Flush

func (s *DB) Flush() error

func (*DB) G

func (s *DB) G() redis.Conn

func (*DB) Receive

func (s *DB) Receive() (reply interface{}, err error)

func (*DB) Send

func (s *DB) Send(commandName string, args ...interface{}) error

Jump to

Keyboard shortcuts

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