driverctx

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

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 NewContextFromBackground

func NewContextFromBackground(ctx context.Context) context.Context

func NewContextWithConnId

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

NewContextWithConnId creates a new context with connectionId value. The connection ID will be displayed in log messages and other dianostic information.

func NewContextWithConnIdCallback

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

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

NewContextWithQueryId creates a new context with queryId value. The query id will be displayed in log messages and other diagnostic information.

func NewContextWithQueryIdCallback

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

func NewContextWithQueryTags

func NewContextWithQueryTags(ctx context.Context, queryTags map[string]string) context.Context

NewContextWithQueryTags creates a new context with per-statement query tags. These tags are serialized and passed via confOverlay as "query_tags" in TExecuteStatementReq. They apply only to the statement executed with this context and do not persist across queries.

func NewContextWithStagingInfo

func NewContextWithStagingInfo(ctx context.Context, stagingAllowedLocalPath []string) context.Context

func QueryIdFromContext

func QueryIdFromContext(ctx context.Context) string

QueryIdFromContext retrieves the queryId stored in context.

func QueryTagsFromContext

func QueryTagsFromContext(ctx context.Context) map[string]string

QueryTagsFromContext retrieves the per-statement query tags stored in context.

func StagingPathsFromContext

func StagingPathsFromContext(ctx context.Context) []string

QueryIdFromContext retrieves the queryId stored in context.

Types

type IdCallbackFunc

type IdCallbackFunc func(string)

Jump to

Keyboard shortcuts

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