context

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Background        = context.Background
	TODO              = context.TODO
	WithCancel        = context.WithCancel
	WithCancelCause   = context.WithCancelCause
	Cause             = context.Cause
	AfterFunc         = context.AfterFunc
	WithoutCancel     = context.WithoutCancel
	WithDeadline      = context.WithDeadline
	WithDeadlineCause = context.WithDeadlineCause
	WithTimeout       = context.WithTimeout
	WithTimeoutCause  = context.WithTimeoutCause
	WithValue         = context.WithValue
)

Functions

View Source
var (
	Canceled         = context.Canceled
	DeadlineExceeded = context.DeadlineExceeded
)

Vars

View Source
var RequestIDCtxKey = CtxKey("_fw_request_id")

Functions

func CtxSetValue

func CtxSetValue(ctx context.Context, key any, value any) context.Context

func GetRequestIDFromCtx

func GetRequestIDFromCtx(ctx context.Context) string

func NoDeadlineAndNotCancellableContext

func NoDeadlineAndNotCancellableContext(parent context.Context) context.Context

NoDeadlineAndNotCancellableContext This creates a context that is not connected to the parent deadline/cancellable behavior.

Types

type CancelCauseFunc

type CancelCauseFunc = context.CancelCauseFunc

Types

type CancelFunc

type CancelFunc = context.CancelFunc

Types

type Context

type Context = context.Context

Types

type CtxKey

type CtxKey any

CtxKey must be an alias to any and set as string like: ctxKey("lib_logger_factory") for gin.Context.Value to work properly.

Jump to

Keyboard shortcuts

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