You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
554 B
Go

// Code generated by gen. DO NOT EDIT.
package app
import (
"joybuywork/internal/config"
"gits.branchcn.com/backend/microcode/plugins/cache"
)
var Redis cache.Plugin
func InitRedis() (err error) {
cacheConfig := cache.PluginConfig{
Host: config.Config.Redis.Addr,
Password: config.Config.Redis.Password,
DbNum: config.Config.Redis.DB,
Sentinel: config.Config.Redis.Sentinel,
SentinelMasterName: config.Config.Redis.SentinelMasterName,
}
Redis, err = cache.NewPlugin(cacheConfig)
return
}