async

package
v0.12.1-0...-0a124f2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner is an abstraction to make it easy to start and stop groups of things that can be described by a single function which waits on a channel close to exit.

func NewRunner

func NewRunner(f ...func(stop chan struct{})) *Runner

NewRunner makes a runner for the given function(s). The function(s) should loop until the channel is closed.

func (*Runner) Start

func (r *Runner) Start()

Start begins running.

func (*Runner) Stop

func (r *Runner) Stop()

Stop stops running.

Jump to

Keyboard shortcuts

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