driverctx

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

View Source
const (
	CorrelationIdContextKey contextKey = iota
	ConnIdContextKey
	QueryIdContextKey
	QueryIdCallbackKey
	ConnIdCallbackKey
)

Variables

This section is empty.

Functions

func ConnIdFromContext

func ConnIdFromContext(ctx context.Context) string

ConnIdFromContext retrieves the connectionId stored in context.

func CorrelationIdFromContext

func CorrelationIdFromContext(ctx context.Context) string

CorrelationIdFromContext retrieves the correlationId stored in context.

func NewContextWithConnId

func NewContextWithConnId(ctx context.Context, connId string) context.Context

NewContextWithConnId creates a new context with connectionId value.

func NewContextWithConnIdCallback added in v1.2.0

func NewContextWithConnIdCallback(ctx context.Context, callback IdCallbackFunc) context.Context

func NewContextWithCorrelationId

func NewContextWithCorrelationId(ctx context.Context, correlationId string) context.Context

NewContextWithCorrelationId creates a new context with correlationId value. Used by Logger to populate field corrId.

func NewContextWithQueryId added in v1.2.0

func NewContextWithQueryId(ctx context.Context, queryId string) context.Context

NewContextWithQueryId creates a new context with queryId value.

func NewContextWithQueryIdCallback added in v1.2.0

func NewContextWithQueryIdCallback(ctx context.Context, callback IdCallbackFunc) context.Context

func QueryIdFromContext added in v1.2.0

func QueryIdFromContext(ctx context.Context) string

QueryIdFromContext retrieves the queryId stored in context.

Types

type IdCallbackFunc added in v1.2.0

type IdCallbackFunc func(string)

Jump to

Keyboard shortcuts

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