// Initialize returns a connection pool to a RedisEdge server from a URL
Initialize returns a connection pool to a RedisEdge server from a URL
// Initialize returns a connection pool to a RedisEdge server from a URL
func Initialize(dc map[string]string, lc logger.LoggingClient) (re *RedisEdge, err error) {
	re = &RedisEdge{
		lc: lc,
		dc: dc,
		pool: &redis.Pool{
			MaxIdle:     3,
			IdleTimeout: 240 * time.Second,
			Dial:        func() (redis.Conn, error) { return redis.DialURL(dc["RedisURL"]) },
		},
	}
	lc.Debug("redisedge.Initialize() started")
	if err = re.checkModules(); err != nil {
		return re, err
	}
	if err = re.initRedisAIModel(); err != nil {
		return re, err
	}
	if err = re.initRedisAIScript(); err != nil {
		return re, err
	}
	lc.Debug("redisedge.Initialize() exited")
	return re, nil
}
func Initialize ( dc map [ string ] string , lc logger . LoggingClient ) ( re * RedisEdge , err error ) { re = & RedisEdge { lc : lc , dc : dc , pool : & redis . Pool { MaxIdle : 3 , IdleTimeout : 240 * time . Second , Dial : func ( ) ( redis . Conn , error ) { return redis . DialURL ( dc [ " " ] ) } , } , } lc . Debug ( " " ) if err = re . checkModules ( ) ; err != nil { return re , err } if err = re . initRedisAIModel ( ) ; err != nil { return re , err } if err = re . initRedisAIScript ( ) ; err != nil { return re , err } lc . Debug ( " " ) return re , nil }
Initialize returns a connection pool to a RedisEdge server from a URL
Initialize returns a connection pool to a RedisEdge server from a URL