redis

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

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 NewPBRedis

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

func WithConfigPath

func WithConfigPath(configPath string) contract.RedisOption

WithConfigPath 加载配置文件地址

func WithRedisConfig

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

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

Types

type PBRedis

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

func (*PBRedis) GetClient

func (pb *PBRedis) GetClient(options ...contract.RedisOption) (*redis.Client, error)

GetClient 获取Client实例

type RedisProvider

type RedisProvider struct {
}

func (*RedisProvider) Boot

func (pb *RedisProvider) Boot(c framework.Container) error

func (*RedisProvider) IsDefer

func (pb *RedisProvider) IsDefer() bool

func (*RedisProvider) Name

func (pb *RedisProvider) Name() string

func (*RedisProvider) Params

func (pb *RedisProvider) Params(c framework.Container) []interface{}

func (*RedisProvider) Register

Jump to

Keyboard shortcuts

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