Documentation ¶
Index ¶
- func GetBaseConfig(c framework.Container) *contract.RedisConfig
- func NewNiceRedis(params ...interface{}) (interface{}, error)
- func WithConfigPath(configPath string) contract.RedisOption
- func WithRedisConfig(f func(options *contract.RedisConfig)) contract.RedisOption
- type NiceRedis
- type ProviderRedis
- func (h *ProviderRedis) Boot(container framework.Container) error
- func (h *ProviderRedis) IsDefer() bool
- func (h *ProviderRedis) Name() string
- func (h *ProviderRedis) Params(container framework.Container) []interface{}
- func (h *ProviderRedis) Register(container framework.Container) framework.NewInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBaseConfig ¶
func GetBaseConfig(c framework.Container) *contract.RedisConfig
GetBaseConfig 读取database.yaml根目录结构
func NewNiceRedis ¶
func NewNiceRedis(params ...interface{}) (interface{}, error)
NewNiceRedis 代表实例化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 NiceRedis ¶
type NiceRedis struct {
// contains filtered or unexported fields
}
NiceRedis 代表nice框架的redis实现
type ProviderRedis ¶
type ProviderRedis struct { }
ProviderRedis 提供App的具体实现方法
func (*ProviderRedis) Boot ¶
func (h *ProviderRedis) Boot(container framework.Container) error
Boot 启动调用
func (*ProviderRedis) Params ¶
func (h *ProviderRedis) Params(container framework.Container) []interface{}
Params 获取初始化参数
func (*ProviderRedis) Register ¶
func (h *ProviderRedis) Register(container framework.Container) framework.NewInstance
Register 注册方法
Click to show internal directories.
Click to hide internal directories.