redis

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: MIT Imports: 7 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseConfig

func GetBaseConfig(c framework.Container) *contract.RedisConfig

GetBaseConfig 读取database.yaml根目录结构

func NewHadeRedis

func NewHadeRedis(params ...interface{}) (interface{}, error)

NewHadeRedis 代表实例化Client

func WithConfigPath

func WithConfigPath(configPath string) contract.RedisOption

WithConfigPath 加载配置文件地址

func WithRedisConfig

func WithRedisConfig(f func(options *contract.RedisConfig)) contract.RedisOption

WithRedisConfig 表示自行配置redis的配置信息

Types

type HadeRedis

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

HadeRedis 代表hade框架的redis实现

func (*HadeRedis) GetClient

func (app *HadeRedis) GetClient(option ...contract.RedisOption) (*redis.Client, error)

GetClient 获取Client实例

type RedisProvider

type RedisProvider struct {
}

RedisProvider 提供App的具体实现方法

func (*RedisProvider) Boot

func (h *RedisProvider) Boot(container framework.Container) error

Boot 启动调用

func (*RedisProvider) IsDefer

func (h *RedisProvider) IsDefer() bool

IsDefer 是否延迟初始化

func (*RedisProvider) Name

func (h *RedisProvider) Name() string

Name 获取字符串凭证

func (*RedisProvider) Params

func (h *RedisProvider) Params(container framework.Container) []interface{}

Params 获取初始化参数

func (*RedisProvider) Register

func (h *RedisProvider) Register(container framework.Container) framework.NewInstance

Register 注册方法

Jump to

Keyboard shortcuts

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