retry

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package retry describes expected backpressure independently of a job runner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryAfter

func RetryAfter(value string, now time.Time) time.Duration

RetryAfter accepts both HTTP forms and never shortens the server's wait.

func Wait

func Wait(ctx context.Context, delay time.Duration) error

Types

type Deferred

type Deferred struct {
	Operation string
	Reason    string
	After     time.Duration
}

Deferred means admission control asked us to wait. It is not a failed operation, and a queue must reschedule it without consuming failure attempts.

func Deferral

func Deferral(err error) (*Deferred, bool)

Deferral recognizes wrapped delays only when every error leaf is a Deferred. An independent joined failure must retain normal retry and error reporting.

func (*Deferred) Error

func (e *Deferred) Error() string

Jump to

Keyboard shortcuts

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