Versions in this module Expand all Collapse all v0 v0.1.0 Jun 1, 2023 Changes in this version + const CrdbAmbiguousErrorCode + const CrdbClockSkewMessage + const CrdbRetryErrCode + const CrdbServerNotAcceptingClients + const CrdbUnknownSQLState + var CtxDisableRetries ctxDisableRetries + type MaxRetryError struct + LastErr error + MaxRetries uint8 + func (e *MaxRetryError) Error() string + func (e *MaxRetryError) Unwrap() error + type NodeConnectionBalancer struct + func NewNodeConnectionBalancer(pool *RetryPool, healthTracker *NodeHealthTracker, interval time.Duration) *NodeConnectionBalancer + func (p *NodeConnectionBalancer) Prune(ctx context.Context) + type NodeHealthTracker struct + func NewNodeHealthChecker(url string) (*NodeHealthTracker, error) + func (t *NodeHealthTracker) HealthyNodeCount() int + func (t *NodeHealthTracker) IsHealthy(nodeID uint32) bool + func (t *NodeHealthTracker) Poll(ctx context.Context, interval time.Duration) + func (t *NodeHealthTracker) SetNodeHealth(nodeID uint32, healthy bool) + type ResettableError struct + Err error + func (e *ResettableError) Error() string + func (e *ResettableError) Unwrap() error + type RetryPool struct + func NewRetryPool(ctx context.Context, name string, config *pgxpool.Config, ...) (*RetryPool, error) + func (p *RetryPool) AcquireAllIdle(ctx context.Context) []*pgxpool.Conn + func (p *RetryPool) BeginFunc(ctx context.Context, txFunc func(pgx.Tx) error) error + func (p *RetryPool) BeginTxFunc(ctx context.Context, txOptions pgx.TxOptions, txFunc func(pgx.Tx) error) error + func (p *RetryPool) Close() + func (p *RetryPool) Config() *pgxpool.Config + func (p *RetryPool) ExecFunc(ctx context.Context, ...) error + func (p *RetryPool) GC(conn *pgx.Conn) + func (p *RetryPool) ID() string + func (p *RetryPool) MaxConns() uint32 + func (p *RetryPool) MinConns() uint32 + func (p *RetryPool) Node(conn *pgx.Conn) uint32 + func (p *RetryPool) QueryFunc(ctx context.Context, rowsFunc func(ctx context.Context, rows pgx.Rows) error, ...) error + func (p *RetryPool) QueryRowFunc(ctx context.Context, rowFunc func(ctx context.Context, row pgx.Row) error, ...) error + func (p *RetryPool) Range(f func(conn *pgx.Conn, nodeID uint32)) + func (p *RetryPool) Stat() *pgxpool.Stat + type RetryableError struct + Err error + func (e *RetryableError) Error() string + func (e *RetryableError) Unwrap() error