context

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	context.Context
	UUID() uuid.UUID
	TaskName() string
	URL() *url.URL
}

Context is a context with UUID, TaskName and URL.

func New

func New(taskName string, id uuid.UUID, url *url.URL) Context

New returns a new jobContext.

func WithTimeout

func WithTimeout(parent Context, timeout time.Duration) (Context, context.CancelFunc)

WithTimeout returns copy of parent with timeout and CancelFunc.

Jump to

Keyboard shortcuts

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