Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimeout = errors.New("runner received timeout")
ErrTimeout is returned when Runner's Run method fails due to a timeout event.
Functions ¶
This section is empty.
Types ¶
type Runnable ¶
Runnable is the interface that wraps the basic Run method.
Run should be implemented by any task intended to be executed by the Runner.
type RunnableFunc ¶
The RunnableFunc type is an adapter to allow the use of ordinary functions as Runnable tasks. If f is a function with the appropriate signature, RunnableFunc(f) is a Runnable that calls f.
type Runner ¶
Runner is the interface that wraps the basic Run method.
Run executes submitted Runnable tasks.
func NewWithTimeout ¶ added in v0.2.1
NewWithTimeout constructs a new ready-to-use Runner with the specified timeout for running a Runnable task.
Click to show internal directories.
Click to hide internal directories.