task

package
v0.0.0-...-16a880a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: MPL-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// RetryAfterErrorDelay is how long we wait before re-try after error.
	RetryAfterErrorDelay = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(context.Context) error

Func is type of task function.

type Task

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

Task is a long-running task (minutes to permanent).

func New

func New(locker locker.Locker, fun Func) *Task

New creates long-running task.

func (*Task) Close

func (t *Task) Close() (err error)

Close implements io.Closer interface. It stops long running-task.

Jump to

Keyboard shortcuts

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