redis

package
v0.0.0-...-2bd70a3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr         string
	Password     string
	DB           int
	MaxRetries   int
	DialTimeout  int
	ReadTimeout  int
	WriteTimeout int
	PoolSize     int
	MinIdleConns int
	IdleTimeout  int
}

type Option

type Option func(*Redis)

func WithLogger

func WithLogger(logger log.Logger) Option

func WithMonitor

func WithMonitor(able bool, interval time.Duration) Option

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

type Redis

type Redis struct {
	*redis.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg Config, opts ...Option) (Redis, func())

func (Redis) PerformanceStats

func (r Redis) PerformanceStats()

Jump to

Keyboard shortcuts

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