timeout

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2019 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) goresilience.Runner

New will wrap a execution unit that will cut the execution of a runner when some time passes using the context. use 0 timeout for default timeout.

func NewMiddleware

func NewMiddleware(cfg Config) goresilience.Middleware

NewMiddleware returns a middleware that will cut the execution of a runner when some time passes using the context. use 0 timeout for default timeout.

Types

type Config

type Config struct {
	// Timeout is the duration that will be waited before giving as a timeouted execution.
	Timeout time.Duration
}

Config is the configuration of the timeout.

Jump to

Keyboard shortcuts

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