redis

package
v2.0.44 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AppName = "redis"
)

Variables

This section is empty.

Functions

func Client

func Client() redis.UniversalClient

Types

type Redis added in v2.0.18

type Redis struct {
	ioc.ObjectImpl
	Endpoints []string `toml:"endpoints" json:"endpoints" yaml:"endpoints" env:"ENDPOINTS" envSeparator:","`
	DB        int      `toml:"db" json:"db" yaml:"db"  env:"DB"`
	UserName  string   `toml:"username" json:"username" yaml:"username"  env:"USERNAME"`
	Password  string   `toml:"password" json:"password" yaml:"password"  env:"PASSWORD"`
	Trace     bool     `toml:"trace" json:"trace" yaml:"trace"  env:"TRACE"`
	Metric    bool     `toml:"metric" json:"metric" yaml:"metric"  env:"METRIC"`
	// contains filtered or unexported fields
}

func Get added in v2.0.8

func Get() *Redis

func (*Redis) Close added in v2.0.18

func (m *Redis) Close(ctx context.Context) error

关闭数据库连接

func (*Redis) Name added in v2.0.18

func (m *Redis) Name() string

func (*Redis) Priority added in v2.0.18

func (i *Redis) Priority() int

Jump to

Keyboard shortcuts

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