package
0.3.19
Repository: https://github.com/romberli/go-util.git
Documentation: pkg.go.dev

# Functions

Close closes global pool, it sets global pool to nil pointer.
Execute execute given sql statement.
ExecuteContext executes given command with context.
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.
InitGlobalPool returns a new *Pool and replaces it as global pool.
InitGlobalPoolWithConfig returns a new *Pool with a Config object and replaces it as global pool.
InitGlobalPoolWithDefault returns a new *Pool with default configuration and replaces it as global pool.
InitGlobalPoolWithPoolConfig returns a new *Pool with a PoolConfig object and replaces it as global pool.
IsClosed returns if global pool had been closed.
NewConfig returns a new client.Config with given address and round tripper.
NewConfigWithBasicAuth returns a new client.Config with given address, user and password.
NewConfigWithDefaultRoundTripper returns a new client.Config with given address and default round tripper.
NewConn returns a new *Conn with given address and round tripper.
NewConnWithConfig returns a new *Conn with given config.
NewEmptyResult returns a new empty *Result.
NewPool returns a new *Pool.
NewPoolConfig returns a new PoolConfig.
NewPoolConfigWithConfig returns a new PoolConfig.
NewPoolConn returns a new *PoolConn.
NewPoolConnWithPool returns a new *PoolConn.
NewPoolWithConfig returns a new *Pool with a Config object.
NewPoolWithDefault returns a new *Pool with default configuration.
NewPoolWithPoolConfig returns a new *Pool with a PoolConfig object.
NewRawData returns a new RawData.
NewResult returns a new *Result with given value and warnings note that if return value is matrix type, only the first matrix will be processed, all others will be discarded, if a query returns more than one matrix, use GetRaw() function to get the raw data which is returned by prometheus go client package.
NewTimeRange returns a new TimeRange.
NewTimeRangeWithRange returns a new TimeRange with given apiv1.Range.
Release releases given number of connections of global pool, each connection will disconnect with database.
ReplaceGlobalPool replaces given pool as global pool.
Supply creates given number of connections and add them to free connection channel of global pool.

# Constants

milliseconds.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
seconds.
No description provided by the author
No description provided by the author
seconds.
No description provided by the author
seconds.
seconds.
No description provided by the author
No description provided by the author
No description provided by the author
seconds.

# Variables

No description provided by the author
DefaultRoundTripper is used if no RoundTripper is set in Config,.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author