withtimeout

package
v0.0.0-...-8b1022e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

README

withtimeout Travis CI Status Coverage Status GoDoc

withtimeout provides a Golang package that allows adding a timeout to any operation.

To install:

go get github.com/getlantern/withtimeout

For docs:

godoc github.com/getlantern/withtimeout

Documentation

Overview

package withtimeout provides functionality for performing operations with a timeout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(timeout time.Duration, fn func() (interface{}, error)) (result interface{}, timedOut bool, err error)

Do executes the given fn and returns either the result of executing it or an error if fn did not complete within timeout. If execution timed out, timedOut will be true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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