func NewPoolConfig(addr, dbName, dbUser, dbPass string, debug bool, readTimeout, writeTimeout int,
	maxConnections, initConnections, maxIdleConnections, maxIdleTime, keepAliveInterval int, altHosts ...string) PoolConfig {
	config := NewConfig(addr, dbName, dbUser, dbPass, debug, readTimeout, writeTimeout, altHosts...)
	return PoolConfig{
		Config:             config,
		MaxConnections:     maxConnections,
		InitConnections:    initConnections,
		MaxIdleConnections: maxIdleConnections,
		MaxIdleTime:        maxIdleTime,
		KeepAliveInterval:  keepAliveInterval,
	}
}
NewPoolConfig returns a new PoolConfig
package clickhouse
import (
	"context"
	"errors"
	"fmt"
	"sync"
	"time"
	"github.com/hashicorp/go-multierror"
	"github.com/romberli/log"
	"github.com/romberli/go-util/constant"
	"github.com/romberli/go-util/middleware"
)
const (
	DefaultMaxConnections     = 20
	DefaultInitConnections    = 5
	DefaultMaxIdleConnections = 10
	DefaultMaxIdleTime        = 1800  
	DefaultKeepAliveInterval  = 300   
	DefaultKeepAliveChunkSize = 5
	DefaultSleepTime          = 1  
)
var _ middleware.PoolConn = (*PoolConn)(nil)
var _ middleware.Pool = (*Pool)(nil)
type PoolConfig struct {
	Config
	MaxConnections     int
	InitConnections    int
	MaxIdleConnections int
	MaxIdleTime        int
	KeepAliveInterval  int
}