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.40.0
Published
Jun 7, 2019
Platform
linux/amd64
Imports
2 packages
Last checked
2 minutes ago

Tools for package owners.