helper

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists test a path existence on the OS.

func Try

func Try(n int, f func() (interface{}, error)) (interface{}, error)

Try a simple exponential retry strategy whose first retry starting after 1s. The max delay timeout is 1min, if exceeds, a timeout error will be returned.

Types

type RetryTimeoutError

type RetryTimeoutError time.Duration

RetryTimeoutError return when the retry delay exceeds the max threshold.

func (RetryTimeoutError) Error

func (t RetryTimeoutError) Error() string

Jump to

Keyboard shortcuts

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