retrier

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetriableError added in v1.5.0

func IsRetriableError(err error) bool

IsRetriableError reports whether retrying an operation that failed with err could succeed. Callers retrying at a coarser granularity than a single query use it so their rule cannot drift from this one.

Types

type Querier

type Querier struct {
	// contains filtered or unexported fields
}

func NewQuerier

func NewQuerier(ctx context.Context, cfg backoff.Config, connBuilder connBuilder, logger loglib.Logger) (*Querier, error)

func (*Querier) Close

func (q *Querier) Close(ctx context.Context) error

func (*Querier) CopyFrom

func (q *Querier) CopyFrom(ctx context.Context, tableName string, columnNames []string, srcRows [][]any) (int64, error)

func (*Querier) Exec

func (q *Querier) Exec(ctx context.Context, query string, args ...any) (postgres.CommandTag, error)

func (*Querier) ExecInTx

func (q *Querier) ExecInTx(ctx context.Context, fn func(tx postgres.Tx) error) error

func (*Querier) ExecInTxWithOptions

func (q *Querier) ExecInTxWithOptions(ctx context.Context, fn func(tx postgres.Tx) error, txOpts postgres.TxOptions) error

func (*Querier) Ping

func (q *Querier) Ping(ctx context.Context) error

func (*Querier) Query

func (q *Querier) Query(ctx context.Context, query string, args ...any) (postgres.Rows, error)

func (*Querier) QueryRow

func (q *Querier) QueryRow(ctx context.Context, dest []any, query string, args ...any) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL