redis

package
v2.0.22 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 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:","`
	Database      int      `toml:"database" json:"database" yaml:"database"  env:"DATABASE"`
	UserName      string   `toml:"username" json:"username" yaml:"username"  env:"USERNAME"`
	Password      string   `toml:"password" json:"password" yaml:"password"  env:"PASSWORD"`
	EnableTrace   bool     `toml:"enable_trace" json:"enable_trace" yaml:"enable_trace"  env:"ENABLE_TRACE"`
	EnableMetrics bool     `toml:"enable_metrics" json:"enable_metrics" yaml:"enable_metrics"  env:"ENABLE_METRICS"`
	// 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