redis

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigs

func GetConfigs(name string) map[string]*Config

GetConfigs 获取配置项

func SetConfig

func SetConfig(name string, c map[string]any) error

func SetIniConfig

func SetIniConfig(name string, section *ini.Section) error

SetIniConfig 设置 ini 配置

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func GetConfig

func GetConfig(name string) (*Config, error)

GetConfig 获取配置项

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func GetRedis

func GetRedis(name string) (*Driver, error)

GetRedis 获取Redis实例

func (*Driver) GetClient

func (d *Driver) GetClient() *redis.Client

GetClient 获取连接

func (*Driver) GetConfig

func (d *Driver) GetConfig() *Config

GetConfig 参数配置

func (*Driver) Init

func (d *Driver) Init() error

Init 初始化

func (*Driver) SetConfig

func (d *Driver) SetConfig(config *Config)

SetConfig 参数配置

Jump to

Keyboard shortcuts

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