redis

package
v2.0.15 Latest Latest
Warning

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

Go to latest
Published: May 14, 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 Redist

type Redist 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() *Redist

func (*Redist) Close

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

关闭数据库连接

func (*Redist) Name

func (m *Redist) Name() string

func (*Redist) Priority added in v2.0.10

func (i *Redist) Priority() int

Jump to

Keyboard shortcuts

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