redisc

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DbType                  = "redis"
	SpanKind                = ext.SpanKindEnum("redis-client")
	MaxPipelineNameCmdCount = 3
	DefaultRWTimeout        = time.Second
)

Variables

View Source
var Name = "redis"

Functions

func Get added in v0.1.2

func Get(ctx context.Context, prefix string, options ...Option) *redis.Client

func GetCfg

func GetCfg() map[string]ClientCfg

func Update added in v0.1.2

func Update(name string, cfg ClientCfg)

Types

type Client added in v0.1.2

type Client struct {
	atomic.Value
}

func (*Client) Get added in v0.1.2

func (t *Client) Get(ctx context.Context, options ...Option) *redis.Client

type ClientCfg

type ClientCfg = redis.Options

func GetDefaultCfg

func GetDefaultCfg() ClientCfg

type Option

type Option func(options *redis.Options)

Jump to

Keyboard shortcuts

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