context

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendedContextWithMetadata

func ExtendedContextWithMetadata[metaType any](baseCtx context.Context, metaKey any, metadata metaType) context.Context

ExtendedContextWithMetadata add metadata to base context

func ForkContextAsNewWithTimeout

func ForkContextAsNewWithTimeout(baseCtx context.Context, newTimeout time.Duration) (context.Context, context.CancelFunc)

ForkContextAsNewWithTimeout will take base context and create new from it

func GetContextMetadata

func GetContextMetadata[metaType any](baseCtx context.Context, metaKey any) (metaData metaType, isExist bool)

GetContextMetadata will try get form context.Context metadata

Types

This section is empty.

Jump to

Keyboard shortcuts

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