rdb

package module
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Nil = redis.Nil

Functions

func FlagSet

func FlagSet(name string) *pflag.FlagSet

func New

func New(cfg *Config) (*redis.Client, error)

Types

type Config

type Config struct {
	Host  string `json:"host" yaml:"host"`
	Pass  string `json:"pass" yaml:"pass"`
	Port  int    `json:"port" yaml:"port"`
	DB    int    `json:"db" yaml:"db"`
	Debug bool   `json:"debug" yaml:"debug"`
}

func (*Config) Addr

func (c *Config) Addr() string

func (*Config) FlagSet

func (c *Config) FlagSet(name string) *pflag.FlagSet

func (*Config) R

func (c *Config) R() *Config

type DebugHook

type DebugHook struct{}

func (DebugHook) DialHook

func (DebugHook) DialHook(next redis.DialHook) redis.DialHook

当创建网络连接时调用

func (DebugHook) ProcessHook

func (DebugHook) ProcessHook(next redis.ProcessHook) redis.ProcessHook

执行命令时调用

func (DebugHook) ProcessPipelineHook

func (DebugHook) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook

执行管道命令时调用

Jump to

Keyboard shortcuts

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