retry

package
v0.0.0-...-10d6984 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package retry exposes retryable runner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Retrier

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

Retrier defines retryer properties.

func NewRetrier

func NewRetrier(retries, sleepSeconds int, retryable Retryable) *Retrier

NewRetrier creates a new Retrier using given properties.

func (*Retrier) RunRetry

func (r *Retrier) RunRetry() error

RunRetry runs a retryable function.

type Retryable

type Retryable interface {
	Try() error
}

Retryable is an interface that implements retrier.

Jump to

Keyboard shortcuts

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