Documentation
¶
Index ¶
- func GetBaseConfig(c framework.Container) *contract.RedisConfig
- func NewGocoreRedis(params ...interface{}) (interface{}, error)
- func WithConfigPath(configPath string) contract.RedisOption
- func WithRedisConfig(f func(options *contract.RedisConfig)) contract.RedisOption
- type GocoreRedis
- type GocoreRedisProvider
- func (h *GocoreRedisProvider) Boot(container framework.Container) error
- func (h *GocoreRedisProvider) IsDefer() bool
- func (h *GocoreRedisProvider) Name() string
- func (h *GocoreRedisProvider) Params(container framework.Container) []interface{}
- func (h *GocoreRedisProvider) 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 读取redis.yaml根目录结构
func NewGocoreRedis ¶
func NewGocoreRedis(params ...interface{}) (interface{}, error)
NewGocoreRedis 代表实例化GocoreRedis
func WithConfigPath ¶
func WithConfigPath(configPath string) contract.RedisOption
WithConfigPath 加载配置文件地址
func WithRedisConfig ¶
func WithRedisConfig(f func(options *contract.RedisConfig)) contract.RedisOption
WithRedisConfig 表示自行配置redis的配置信息
Types ¶
type GocoreRedis ¶
type GocoreRedis struct {
// contains filtered or unexported fields
}
GocoreRedis 代表gocore框架的redis实现
func (*GocoreRedis) GetClient ¶
func (app *GocoreRedis) GetClient(option ...contract.RedisOption) (*redis.Client, error)
type GocoreRedisProvider ¶
type GocoreRedisProvider struct { }
GocoreRedisProvider 提供Redis的具体实现方法
func (*GocoreRedisProvider) Boot ¶
func (h *GocoreRedisProvider) Boot(container framework.Container) error
Boot 启动调用
func (*GocoreRedisProvider) Params ¶
func (h *GocoreRedisProvider) Params(container framework.Container) []interface{}
Params 获取初始化参数
func (*GocoreRedisProvider) Register ¶
func (h *GocoreRedisProvider) Register(container framework.Container) framework.NewInstance
Register 注册方法
Click to show internal directories.
Click to hide internal directories.