retryerrors

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package retryerrors implements the retryable error interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRetryableSQLError added in v1.0.0

func IsRetryableSQLError(err error) bool

IsRetryableSQLError checks if an error is retryable by the database. Only use this for idempotent operations. https://www.postgresql.org/docs/current/errcodes-appendix.html

Types

type NonRecoverableError

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

func NewNonRecoverableError

func NewNonRecoverableError(msg string, err error) *NonRecoverableError

func (NonRecoverableError) Error

func (e NonRecoverableError) Error() string

func (NonRecoverableError) ShouldRetry

func (e NonRecoverableError) ShouldRetry() bool

func (NonRecoverableError) Unwrap added in v1.1.0

func (e NonRecoverableError) Unwrap() error

type RecoverableError

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

func NewRecoverableError

func NewRecoverableError(msg string, err error) *RecoverableError

func (RecoverableError) Error

func (e RecoverableError) Error() string

func (RecoverableError) ShouldRetry

func (e RecoverableError) ShouldRetry() bool

func (RecoverableError) Unwrap added in v1.1.0

func (e RecoverableError) Unwrap() error

type RetryableError

type RetryableError interface {
	error
	ShouldRetry() bool
}

Jump to

Keyboard shortcuts

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