cancel

package
v3.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 2 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
	Cancel()
}

func New

func New(ctx context.Context) Context

Creates a context that wraps the given context and returns an obj that can be cancelled. This allows an object which desires to cancel a long running operation to store a single cancel.Context in it's struct variables instead of having to store both the context.Context and context.CancelFunc.

Jump to

Keyboard shortcuts

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