context

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxRequestId

func CtxRequestId(ctx context.Context) string

CtxRequestId returns the request id from a given context.

func CtxRootSpan

func CtxRootSpan(ctx context.Context) trace.Span

CtxRootSpan returns the root span from a given context.

func CtxSessionID

func CtxSessionID(ctx context.Context) string

CtxSessionID returns the session id from a given context.

func CtxStartTime

func CtxStartTime(ctx context.Context) time.Time

CtxStartTime returns the start time from a given context.

func WithRequestID

func WithRequestID(ctx context.Context, requestID string) context.Context

WithRequestID adds a given request id to a given context.

func WithRootSpan

func WithRootSpan(ctx context.Context, span trace.Span) context.Context

WithRootSpan adds a root span to a given context.

func WithSessionID

func WithSessionID(ctx context.Context, sessionID string) context.Context

WithSessionID adds a given session id to a given context.

func WithStartTime

func WithStartTime(ctx context.Context, t time.Time) context.Context

WithStartTime adds a start time to a given context.

Types

type CtxRequestIdKey

type CtxRequestIdKey struct{}

type CtxRootSpanKey

type CtxRootSpanKey struct{}

type CtxSessionIdKey

type CtxSessionIdKey struct{}

type CtxStartTimeKey

type CtxStartTimeKey struct{}

Jump to

Keyboard shortcuts

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