redis

package
v0.0.0-...-d5eddb0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

Conn is the redis resilient connection.

func NewResilientConn

func NewResilientConn(url, pwd string, db int) (*Conn, error)

NewResilientConn returns a connection that automatically recover from failures.

func (*Conn) Close

func (c *Conn) Close() error

Close terminates the goroutine that recover lost connections.

func (*Conn) Do

func (c *Conn) Do(commandName string, args ...interface{}) (interface{}, error)

func (*Conn) Flush

func (c *Conn) Flush() error

func (*Conn) Send

func (c *Conn) Send(commandName string, args ...interface{}) error

type Redis

type Redis interface {
	Do(commandName string, args ...interface{}) (reply interface{}, err error)
	Send(commandName string, args ...interface{}) error
	Flush() error
	Close() error
}

Redis is the interface of the Redis client.

Jump to

Keyboard shortcuts

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