Version: v1.0.3 Latest Latest

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

Go to latest
Published: Sep 22, 2016 License: MIT Imports: 6 Imported by: 0




This section is empty.


This section is empty.


func RunCommand

func RunCommand(binary string, args ...string) (*exec.Cmd, string, error)

RunCommand runs the specified command with arguments and returns the output and the error if any.

func Try

func Try(timeout time.Duration, operation func() error) error

Try try operation timeout, and retry backoff

func TryRequest

func TryRequest(url string, timeout time.Duration, condition Condition) error

TryRequest try operation timeout, and retry backoff


type Condition

type Condition func(*http.Response) error

Condition is a retry condition function. It receives a response, and returns an error if the response failed the condition.

func ErrorIfStatusCodeIsNot

func ErrorIfStatusCodeIsNot(status int) Condition

ErrorIfStatusCodeIsNot returns a retry condition function. The condition returns an error if the given response's status code is not the given HTTP status code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL