retryafter

package
v0.2.55 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package retryafter parses HTTP Retry-After values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(v string, now time.Time, limit time.Duration) (time.Duration, bool)

Parse reads a Retry-After value, either delay-seconds or an HTTP-date, relative to now. It reports false for an empty, malformed or negative value, and for a date that is not in the future (usually clock skew), so callers apply their own default. A positive limit caps the delay: a huge value neither overflows nor pauses the caller for longer than it allows.

Types

This section is empty.

Jump to

Keyboard shortcuts

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