func Get() (*PoolConn, error) {
	conn, err := _globalPool.Get()
	if err != nil {
		return nil, err
	}
	return conn.(*PoolConn), nil
}
Get get gets a connection from pool and validate it,
if there is no valid connection in the pool, it will create a new connection
package clickhouse
import (
	"context"
	"errors"
	"github.com/romberli/go-util/middleware"
)
var _globalPool *Pool
func InitGlobalPool(addr, dbName, dbUser, dbPass string, debug bool, readTimeout, writeTimeout int,
	maxConnections, initConnections, maxIdleConnections, maxIdleTime, keepAliveInterval int, altHosts ...string) error {
	cfg := NewPoolConfig(addr, dbName, dbUser, dbPass, debug, readTimeout, writeTimeout, maxConnections, initConnections, maxIdleConnections, maxIdleTime, keepAliveInterval, altHosts...)
	return InitGlobalPoolWithPoolConfig(cfg)
}
func InitGlobalPoolWithDefault(addr, dbName, dbUser, dbPass string) error {
	return InitGlobalPool(addr, dbName, dbUser, dbPass, false, DefaultReadTimeout, DefaultWriteTimeout,
		DefaultMaxConnections, DefaultInitConnections, DefaultMaxIdleConnections, DefaultMaxIdleTime, DefaultKeepAliveInterval)
}
func InitGlobalPoolWithConfig(config Config, maxConnections, initConnections, maxIdleConnections, maxIdleTime, keepAliveInterval int) error {
	cfg := NewPoolConfigWithConfig(config, maxConnections, initConnections, maxIdleConnections, maxIdleTime, keepAliveInterval)
	return InitGlobalPoolWithPoolConfig(cfg)
}
func InitGlobalPoolWithPoolConfig(config PoolConfig) error {
	pool, err := NewPoolWithPoolConfig(config)
	if err != nil {
		return err
	}
	return ReplaceGlobalPool(pool)
}
func ReplaceGlobalPool(pool *Pool) error {
	if _globalPool != nil {
		err := _globalPool.Close()
		if err != nil {
			return err
		}
	}
	_globalPool = pool
	return nil
}
func IsClosed() bool {
	return _globalPool.IsClosed()
}
func Supply(num int) error {
	return _globalPool.Supply(num)
}
func Close() error {
	if _globalPool == nil {
		return nil
	}
	err := _globalPool.Close()
	_globalPool = nil
	return err
}