cource

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context, key any) chan event.GenericEvent

FromContext creates or gets the channel for the specified key.

func FromContextWithBuffer

func FromContextWithBuffer(
	ctx context.Context,
	key any,
	buffer int) chan event.GenericEvent

FromContextWithBuffer creates or gets the buffered channel for the specified key and buffer size.

func JoinContext

func JoinContext(left, right context.Context) context.Context

JoinContext returns a new context that contains a reference to the channels map from the specified context. This function panics if the provided context does not contain a channels map. This function is thread-safe.

func NewContext

func NewContext() context.Context

NewContext returns a new context with a new channels map.

func ValidateContext

func ValidateContext(ctx context.Context) bool

ValidateContext returns true if the provided context contains the channels map and key.

func WithContext

func WithContext(parent context.Context) context.Context

WithContext returns a new context with a new channels map, with the provided context as the parent.

Types

This section is empty.

Jump to

Keyboard shortcuts

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