Versions in this module Expand all Collapse all v0 v0.3.0 Jul 13, 2017 Changes in this version + var ErrDiscard = resp.NewError("EXECABORT Transcation discarded.") + type Command struct + Args Args + Cmd string + type CommandReader struct + func (r *CommandReader) Close() error + func (r *CommandReader) Read(cmd *Command) bool + type Conn struct + func Dial(network string, address string) (*Conn, error) + func DialContext(ctx context.Context, network string, address string) (*Conn, error) + func NewClientConn(conn net.Conn) *Conn + func NewServerConn(conn net.Conn) *Conn + func (c *Conn) Close() error + func (c *Conn) Flush() error + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) Read(b []byte) (int, error) + func (c *Conn) ReadArgs() Args + func (c *Conn) ReadCommands() *CommandReader + func (c *Conn) ReadTxArgs(n int) *TxArgs + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) SetDeadline(t time.Time) error + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) Write(b []byte) (int, error) + func (c *Conn) WriteArgs(args Args) error + func (c *Conn) WriteCommands(cmds ...Command) error type Transport + MaxIdleConns int + MaxIdleConnsPerHost int + type TxArgs struct + func (tx *TxArgs) Close() error + func (tx *TxArgs) Len() int + func (tx *TxArgs) Next() Args v0.2.0 Jul 11, 2017 Changes in this version + var DefaultClient = &Client + var DefaultDialer = &net.Dialer + var ErrHijacked = errors.New("invalid use of a hijacked redis.ResponseWriter") + var ErrNegativeStreamCount = errors.New("invalid call to redis.ResponseWriter.Stream with a negative value") + var ErrServerClosed = errors.New("redis: Server closed") + var ErrStreamCalledAfterWrite = errors.New(...) + var ErrStreamCalledTooManyTimes = errors.New("multiple calls to ResponseWriter.Stream") + var ErrWriteCalledNotEnoughTimes = errors.New("not enough calls to redis.ResponseWriter.Write") + var ErrWriteCalledTooManyTimes = errors.New("too many calls to redis.ResponseWriter.Write") + func Exec(ctx context.Context, cmd string, args ...interface{}) error + func Int(args Args) (i int, err error) + func Int64(args Args) (i int64, err error) + func ListenAndServe(addr string, handler Handler) error + func ParseArgs(args Args, dsts ...interface{}) error + func Serve(l net.Listener, handler Handler) error + func String(args Args) (s string, err error) + type Args interface + Close func() error + Len func() int + Next func(dst interface{}) bool + func List(args ...interface{}) Args + func MultiArgs(args ...Args) Args + func Query(ctx context.Context, cmd string, args ...interface{}) Args + type Client struct + Addr string + Timeout time.Duration + Transport RoundTripper + func (c *Client) Do(req *Request) (*Response, error) + func (c *Client) Exec(ctx context.Context, cmd string, args ...interface{}) error + func (c *Client) Query(ctx context.Context, cmd string, args ...interface{}) Args + type Flusher interface + Flush func() error + type Handler interface + ServeRedis func(ResponseWriter, *Request) + type HandlerFunc func(ResponseWriter, *Request) + func (f HandlerFunc) ServeRedis(res ResponseWriter, req *Request) + type Hijacker interface + Hijack func() (net.Conn, *bufio.ReadWriter, error) + type Request struct + Addr string + Args Args + Cmd string + Context context.Context + func NewRequest(addr string, cmd string, args Args) *Request + func (req *Request) ParseArgs(dsts ...interface{}) error + func (req *Request) Write(w io.Writer) error + type Response struct + Args Args + Request *Request + func (res *Response) Write(w io.Writer) error + type ResponseWriter interface + Write func(v interface{}) error + WriteStream func(n int) error + type ReverseProxy struct + ErrorLog *log.Logger + Registry ServerRegistry + Transport RoundTripper + func (proxy *ReverseProxy) ServeRedis(w ResponseWriter, r *Request) + type RoundTripper interface + RoundTrip func(*Request) (*Response, error) + var DefaultTransport RoundTripper = &Transport{ ... } + type Server struct + Addr string + ErrorLog *log.Logger + Handler Handler + IdleTimeout time.Duration + ReadTimeout time.Duration + WriteTimeout time.Duration + func (s *Server) Close() error + func (s *Server) ListenAndServe() error + func (s *Server) Serve(l net.Listener) error + func (s *Server) Shutdown(ctx context.Context) error + type ServerEndpoint struct + Addr string + Name string + func (endpoint ServerEndpoint) LookupServers(ctx context.Context) ([]ServerEndpoint, error) + type ServerList []ServerEndpoint + func (list ServerList) LookupServers(ctx context.Context) ([]ServerEndpoint, error) + type ServerRegistry interface + LookupServers func(ctx context.Context) ([]ServerEndpoint, error) + type SubConn struct + func NewSubConn(conn net.Conn) *SubConn + func (sub *SubConn) Close() error + func (sub *SubConn) LocalAddr() net.Addr + func (sub *SubConn) ReadMessage() (channel string, message []byte, err error) + func (sub *SubConn) RemoteAddr() net.Addr + func (sub *SubConn) SetDeadline(t time.Time) error + func (sub *SubConn) SetReadDeadline(t time.Time) error + func (sub *SubConn) SetWriteDeadline(t time.Time) error + func (sub *SubConn) WriteCommand(command string, channels ...string) (err error) + type Transport struct + ConnsPerHost int + DialContext func(context.Context, string, string) (net.Conn, error) + PingInterval time.Duration + PingTimeout time.Duration + func (t *Transport) CloseIdleConnections() + func (t *Transport) PSubscribe(ctx context.Context, network string, address string, patterns ...string) (*SubConn, error) + func (t *Transport) RoundTrip(req *Request) (*Response, error) + func (t *Transport) Subscribe(ctx context.Context, network string, address string, channels ...string) (*SubConn, error)