context

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCancelFunc

func GetCancelFunc(ctx context.Context) context.CancelFunc

GetCancelFunc returns the CancelFunc if present or a stub function that does nothing

func NewCancelFuncContext

func NewCancelFuncContext(ctx context.Context, cancelFunc context.CancelFunc) context.Context

NewCancelFuncContext returns a context with a CancelFunc embedded as a value This allows downstream handlers to cancel themselves and child contexts all the way up the callstack

Types

type CancelFuncContextKey

type CancelFuncContextKey string

Jump to

Keyboard shortcuts

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