package data import ( "git.gz.internal.jumaiyx.cn/jm/jmproto/conf" jredis "git.gz.internal.jumaiyx.cn/job/room-hot-compute/pkg/redis" "git.gz.internal.jumaiyx.cn/pkg/log" "github.com/google/wire" ) var ProviderDataSet = wire.NewSet(NewData) type Data struct { Cache *jredis.Cache } func NewData(c *conf.Data, log log.Logger) (*Data, func(), error) { cleanup := func() { log.Info("closing the data resources") } cache := jredis.NewCache(log, c.Redis) return &Data{ Cache: cache, // redis }, cleanup, nil }