redis

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Nil = redis.Nil

Nil reply returned by Redis when key does not exist.

Variables

This section is empty.

Functions

func Error

func Error(err error) error

func ExistKey

func ExistKey(err error) bool

Types

type Option

type Option interface {
	GetNetwork() string
	GetAddr() string
	GetPassword() string
	GetSelectDb() int32
	GetReadTimeout() *durationpb.Duration
	GetWriteTimeout() *durationpb.Duration
	GetMaxIdleConns() int32
	GetMinIdleConns() int32
	GetConnMaxIdleTime() *durationpb.Duration
	GetConnMaxLiftTime() *durationpb.Duration
}

type Redis

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

func NewRedis

func NewRedis(opt Option, logger log.Logger) (*Redis, func(), error)

func (*Redis) RDB

func (r *Redis) RDB(ctx context.Context) *redis.Client

Jump to

Keyboard shortcuts

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