netretry

package
v5.36.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package netretry provides shared retry utilities for transient network errors across Kubernetes client packages (Docker, Helm, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExponentialDelay

func ExponentialDelay(
	attempt int,
	baseWait, maxWait time.Duration,
) time.Duration

ExponentialDelay returns the delay for the given retry attempt using exponential backoff. Uses the formula: min(baseWait * 2^(attempt-1), maxWait).

func IsRetryable

func IsRetryable(err error) bool

IsRetryable returns true if the error indicates a transient network error that should be retried. This covers HTTP 5xx status codes and TCP-level errors such as connection resets, timeouts, and unexpected EOF.

Types

This section is empty.

Jump to

Keyboard shortcuts

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