retry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package retry provides the backoff and context-aware sleep primitives used by the ekart client's transport layer. It is internal and not part of the public API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Backoff

func Backoff(attempt int) time.Duration

Backoff returns the delay before the given (1-based) retry attempt, using exponential growth with full jitter, capped at maxDelay.

func Sleep

func Sleep(ctx context.Context, d time.Duration) error

Sleep pauses for d or until ctx is done, whichever comes first. It returns ctx.Err() if the context is cancelled before the delay elapses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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