redis

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 5 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 {
	Endpoints     []string `toml:"endpoints" json:"endpoints" yaml:"endpoints" env:"REDIS_ENDPOINTS" envSeparator:","`
	Database      int      `toml:"database" json:"database" yaml:"database"  env:"REDIS_DATABASE"`
	UserName      string   `toml:"username" json:"username" yaml:"username"  env:"REDIS_USERNAME"`
	Password      string   `toml:"password" json:"password" yaml:"password"  env:"REDIS_PASSWORD"`
	EnableTrace   bool     `toml:"enable_trace" json:"enable_trace" yaml:"enable_trace"  env:"REDIS_ENABLE_TRACE"`
	EnableMetrics bool     `toml:"enable_metrics" json:"enable_metrics" yaml:"enable_metrics"  env:"REDIS_ENABLE_METRICS"`

	ioc.ObjectImpl
	// contains filtered or unexported fields
}

func (*Redist) Close

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

关闭数据库连接

func (*Redist) Name

func (m *Redist) Name() string

Jump to

Keyboard shortcuts

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