contextutil

package
v1.108.0-cluster Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStopChanContext

func NewStopChanContext(stopCh <-chan struct{}) (context.Context, context.CancelFunc)

NewStopChanContext returns new context for the given stopCh, together with cancel function.

The returned context is canceled on the following events:

  • when stopCh is closed
  • when the returned CancelFunc is called

The caller must call the returned CancelFunc when the context is no longer needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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