meta

package
v3.18.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 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"

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

	// hints
	HintSessionClose = "session-close"
)
View Source
const (
	VersionMajor = "3"
	VersionMinor = "18"
	VersionPatch = "1"
)

Variables

This section is empty.

Functions

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 {
	Meta(ctx context.Context) (context.Context, error)

	WithDatabase(database string) Meta
	WithCredentials(creds credentials.Credentials) Meta
	WithUserAgent(userAgent string) Meta

	Database() string
	UserAgent() string
}

func New

func New(
	database string,
	credentials credentials.Credentials,
	trace trace.Driver,
	requestsType string,
	userAgent string,
) Meta

Jump to

Keyboard shortcuts

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