context

package
v1.43.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromStopChannel added in v1.8.0

func FromStopChannel(stopCh <-chan struct{}) context.Context

FromStopChannel creates a new context from a given stop channel.

Types

type Ops

type Ops interface {
	// WithTimeout returns a new context with the given timeout that can be canceled with the returned function.
	WithTimeout(ctx context.Context, timeout time.Duration) (context.Context, context.CancelFunc)
}

Ops are operations to do with a context. They mimic the functions from the context package.

func DefaultOps

func DefaultOps() Ops

DefaultOps returns the default Ops implementation.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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