redisstub

package
v1.1.0-alpha-5 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryRedis

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

MemoryRedis is an in memory redis connection implementation

func NewMemoryRedis

func NewMemoryRedis() *MemoryRedis

NewMemoryRedis creates a new in-memory redis stub. It must be noted that the stub only partially redis-compliant, not all commands (such as MULTI/EXEC) are supported. WARNING: should be used for testing/dev purposes only!

func (*MemoryRedis) Address

func (mr *MemoryRedis) Address() string

Address returns the tcp (local) address of this MemoryRedis server

func (*MemoryRedis) Close

func (mr *MemoryRedis) Close()

Close the embedded Go Redis Server.

func (*MemoryRedis) Dial

func (mr *MemoryRedis) Dial(connectionString string, database int) (redis.Conn, error)

Dial to the embedded Go Redis Server, and return the established connection if possible.

func (*MemoryRedis) Listen

func (mr *MemoryRedis) Listen()

Listen to any incoming TCP requests, and process them in the embedded Go Redis Server.

Jump to

Keyboard shortcuts

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