code: func (rc *RedisConnector) open(socketPath, host, password string, db int, cnf *config.RedisConfig, tlsConfig *tls.Config) (redis.Conn, error) {
  	var opts = []redis.DialOption{
  		redis.DialDatabase(db),
  		redis.DialReadTimeout(time.Duration(cnf.ReadTimeout) * time.Second),
  		redis.DialWriteTimeout(time.Duration(cnf.WriteTimeout) * time.Second),
  		redis.DialConnectTimeout(time.Duration(cnf.ConnectTimeout) * time.Second),
  	}
  
  	if tlsConfig != nil {
  		opts = append(opts, redis.DialTLSConfig(tlsConfig), redis.DialUseTLS(true))
  	}
  
  	if password != "" {
  		opts = append(opts, redis.DialPassword(password))
  	}
  
  	if socketPath != "" {
  		return redis.Dial("unix", socketPath, opts...)
  	}
  
  	return redis.Dial("tcp", host, opts...)
  }
docs: // Open a new Redis connection