dbretry

package
v0.0.0-...-eefbc77 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryableError

func IsRetryableError(err error) bool

IsRetryableError checks if the given error is retryable.

func NoResult

func NoResult(ctx context.Context, operation func(context.Context) error) error

NoResult wraps a database operation that doesn't return a result.

func Operation

func Operation[T any](ctx context.Context, operation func(context.Context) (T, error)) (T, error)

Operation wraps a database operation with retry logic.

func Transaction

func Transaction(ctx context.Context, db *bun.DB, fn func(context.Context, bun.Tx) error) error

Transaction wraps a database transaction with retry logic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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