redis

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoRedisConfig = errors.New("no redis configuration found with config prefix")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	Pipeline() Pipeline
	// contains filtered or unexported methods
}

func NewRedis

func NewRedis(prefix string) (Client, error)

func NewRedisDefaultConfig

func NewRedisDefaultConfig(prefix string, defaultConfig *CommonConfig) (client Client, err error)

type ClientWrapper

type ClientWrapper struct {
	*redis.Client
}

func (*ClientWrapper) Pipeline

func (c *ClientWrapper) Pipeline() Pipeline

type ClusterClientWrapper

type ClusterClientWrapper struct {
	*redis.ClusterClient
}

func (*ClusterClientWrapper) Pipeline

func (c *ClusterClientWrapper) Pipeline() Pipeline

type CommonConfig

type CommonConfig struct {
	DB           int64
	Password     string
	MaxRetries   int
	DialTimeout  time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	PoolSize     int
	PoolTimeout  time.Duration
	IdleTimeout  time.Duration
	TryLegacy    bool
	TryLocal     bool
}

type Pipeline

type Pipeline interface {
	Exec() ([]redis.Cmder, error)
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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