package main

import (
	"github.com/go-redis/redis/v7"

	"lc/common/util"
)

var redisEdgeData *redis.Client

func InitRedis(conf *util.RedisConfig) bool {
	var err error
	redisEdgeData, err = util.NewRedisClient(conf, util.REDIS_DBIDX_EDGE_DATA)
	if err != nil {
		return false
	}
	return true
}

func UnInitRedis() {
	if redisEdgeData != nil {
		_ = redisEdgeData.Close()
	}
}
