package db

import (
	"copter-train/conf"

	"github.com/go-redis/redis/v8"
	"infish.cn/comm"
)

// 从config-service中获取配置，创建
func NewConfigRedisClient(bus *comm.NatsBus, config *conf.AppConf) *redis.Client {
	redisCli, err := bus.NewRedisFromConfig(config.Configer.Redis)
	if err != nil {
		panic(err)
	}
	return redisCli
}
