redis

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KMasterName        = "mymaster"
	KRedisTypeSingle   = "single"
	KRedisTypeSentinel = "sentinel"
)

Variables

This section is empty.

Functions

func Del

func Del(keys ...string) error

func GetRedisClient

func GetRedisClient() *redis.Client

func InitClient

func InitClient(opt *Options) error

func SetNx

func SetNx(key string, value interface{}, seconds time.Duration) (bool, error)

Types

type Options

type Options struct {
	Type      string `yaml:"type"`
	Addr      string `yaml:"addr"`
	Pwd       string `yaml:"pwd"`
	Auth      bool   `yaml:"auth"`
	TLSConfig bool   `yaml:"tlsconfig"`
}

func NewDefaultOpt

func NewDefaultOpt() *Options

Jump to

Keyboard shortcuts

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