meta

package
v3.39.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// outgoing headers
	HeaderDatabase           = "x-ydb-database"
	HeaderTicket             = "x-ydb-auth-ticket"
	HeaderVersion            = "x-ydb-sdk-build-info"
	HeaderRequestType        = "x-ydb-request-type"
	HeaderTraceID            = "x-ydb-trace-id"
	HeaderUserAgent          = "x-ydb-user-agent"
	HeaderClientCapabilities = "x-ydb-client-capabilities"

	// outgoing hints
	HintSessionBalancer = "session-balancer"

	// incomming headers
	HeaderServerHints = "x-ydb-server-hints"

	// incoming hints
	HintSessionClose = "session-close"
)
View Source
const (
	VersionMajor = "3"
	VersionMinor = "38"
	VersionPatch = "5"
)
View Source
const Version = VersionMajor + "." + VersionMinor + "." + VersionPatch

Variables

This section is empty.

Functions

func WithAllowFeatures added in v3.29.2

func WithAllowFeatures(ctx context.Context, features ...string) context.Context

WithAllowFeatures returns a copy of parent context with allowed client feature

func WithRequestType added in v3.13.0

func WithRequestType(ctx context.Context, requestType string) context.Context

WithRequestType returns a copy of parent context with custom request type

func WithTraceID

func WithTraceID(ctx context.Context, traceID string) context.Context

WithTraceID returns a copy of parent context with traceID

func WithUserAgent

func WithUserAgent(ctx context.Context, userAgent string) context.Context

WithUserAgent returns a copy of parent context with custom user-agent info

Types

type Meta

type Meta interface {
	Context(ctx context.Context) (context.Context, error)
}

func New

func New(
	database string,
	credentials credentials.Credentials,
	trace trace.Driver,
	opts ...Option,
) Meta

type Option added in v3.29.2

type Option func(m *meta)

func AllowOption added in v3.29.2

func AllowOption(feature string) Option

func ForbidOption added in v3.29.2

func ForbidOption(feature string) Option

func WithRequestTypeOption added in v3.29.2

func WithRequestTypeOption(requestType string) Option

func WithUserAgentOption added in v3.29.2

func WithUserAgentOption(userAgent string) Option

Jump to

Keyboard shortcuts

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