cancelctx

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package cancelctx provides methods for creating context with injected cancel func for it

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) context.CancelFunc

FromContext returns a cancel func for the context

func WithCancel

func WithCancel(parent context.Context) (context.Context, context.CancelFunc)

WithCancel creates a context with cancel func and injects it into the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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