package retry

import "cloud.google.com/go/auth/internal/retry"

Index

Functions

func Sleep

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

Sleep is the equivalent of gax.Sleep without the need for the dependency.

Types

type Retryer

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

Retryer is a retryer for HTTP requests.

func New

func New() *Retryer

New returns a new Retryer with the default backoff strategy.

func (*Retryer) Retry

func (r *Retryer) Retry(status int, err error) (time.Duration, bool)

Retry determines if a request should be retried.

Source Files

retry.go

Version
v0.20.0 (latest)
Published
Apr 6, 2026
Platform
darwin/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.