redis

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPingClosed = errors.New("ping interface has been closed")
	ErrBadPong    = errors.New("pong response payload is bad")
)

errors

View Source
var (
	ErrBadAssert  = errs.New("bad assert for redis")
	ErrBadCount   = errs.New("bad count number")
	ErrBadRequest = errs.New("bad request")
)

errors

Functions

func NewNodeConn

func NewNodeConn(cluster, addr string, dialTimeout, readTimeout, writeTimeout time.Duration) (nc proto.NodeConn)

NewNodeConn create the node conn from proxy to redis

func NewPinger added in v1.3.2

func NewPinger(conn *libnet.Conn) proto.Pinger

NewPinger new pinger.

func NewProxyConn

func NewProxyConn(conn *libnet.Conn) proto.ProxyConn

NewProxyConn creates new redis Encoder and Decoder.

Types

type Request

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

Request is the type of a complete redis command

func (*Request) Cmd

func (r *Request) Cmd() []byte

Cmd get the cmd

func (*Request) CmdString

func (r *Request) CmdString() string

CmdString get the cmd

func (*Request) Key

func (r *Request) Key() []byte

Key impl the proto.protoRequest and get the Key of redis

func (*Request) Put

func (r *Request) Put()

Put the resource back to pool

Jump to

Keyboard shortcuts

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