package backoff

import "cloud.google.com/go/spanner/internal/backoff"

Index

Variables

var DefaultBackoff = ExponentialBackoff{minBackoff, maxBackoff}

Types

type ExponentialBackoff

type ExponentialBackoff struct {
	Min, Max time.Duration
}

func (ExponentialBackoff) Delay

func (b ExponentialBackoff) Delay(retries int) time.Duration

delay calculates the delay that should happen at n-th exponential backoff in a series.

Source Files

backoff.go

Version
v0.41.0
Published
Jul 1, 2019
Platform
js/wasm
Imports
2 packages
Last checked
18 minutes ago

Tools for package owners.