Exemple #1
0
// Setup is settings
func Setup() (*StoreRedis, error) {
	redisURL := conf.GetConf().Redis.URL
	host, pass, port, err := hrk.GetRedisInfo(redisURL)
	if err != nil {
		return nil, err
	}
	rd = StoreRedis{}
	rd.RD = rds.New(host, uint16(port), pass, 0)
	//rd.RD.Connection(0)

	return &rd, nil
}
Exemple #2
0
func newRedis() {
	r := conf.GetConf().Redis

	redis.New(r.Host, r.Port, r.Pass, 0)
	//redis.GetRedisInstance().Connection(0)
}