func NewWithActiveLimit(param ConnectionParam, maxIdle int, maxActive int) (RedUtilPool, ReconnectPolicy) {
	if param.Policy == nil {
		param.Policy = &LogReconnectPolicy{Base: 10, Factor: time.Millisecond}
	}
	options := make([]redis.DialOption, 0)
	if param.UseTLS {
		options = append(options, redis.DialUseTLS(param.UseTLS))
	}
	if param.Password != "" {
		options = append(options, redis.DialPassword(param.Password))
	}
	if param.Timeout > 0 {
		options = append(options, []redis.DialOption{
			redis.DialConnectTimeout(param.Timeout),
			redis.DialReadTimeout(param.Timeout),
			redis.DialWriteTimeout(param.Timeout),
		}...)
	}
	if param.UseCluster {
		host, _, err := net.SplitHostPort(param.Address)
		if err != nil {
			panic(err)
		}
		options = append(options, redis.DialTLSConfig(&tls.Config{
			InsecureSkipVerify: false,
			ServerName:         host,
		}))
		return &redisc.Cluster{
			StartupNodes: []string{param.Address},
			DialOptions:  options,
			CreatePool:   connectPool(maxIdle, maxActive),
		}, param.Policy
	}
	return &redis.Pool{Dial: connect(param.Address, options...), MaxIdle: maxIdle, MaxActive: maxActive}, param.Policy
}
NewWithActiveLimit makes and returns a pointer to a new Connector instance. It sets some
defaults on the ConnectionParam object, such as the policy, which defaults to
a LogReconnectPolicy with a base of 10ms. A call to this function does not
produce a connection.
package conn
import (
	"crypto/tls"
	"net"
	"time"
	"github.com/gomodule/redigo/redis"
	"github.com/mna/redisc"
)
type ConnectionParam struct {
	Address string
	Password string
	Policy ReconnectPolicy
	Timeout time.Duration
	UseTLS bool
	UseCluster bool
}
type RedUtilPool interface {
	Get() redis.Conn
}