Documentation ¶
Index ¶
- Constants
- func CallTrailerCallback(ctx context.Context, md metadata.MD)
- func TraceID(ctx context.Context, opts ...func(opts *newTraceIDOpts)) (context.Context, string, error)
- func WithAllowFeatures(ctx context.Context, features ...string) context.Context
- func WithApplicationName(ctx context.Context, applicationName string) context.Context
- func WithRequestType(ctx context.Context, requestType string) context.Context
- func WithTraceID(ctx context.Context, traceID string) context.Context
- func WithTrailerCallback(ctx context.Context, callback MetadataCallback) context.Context
- type Meta
- type MetadataCallback
- type Option
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" HeaderApplicationName = "x-ydb-application-name" HeaderClientCapabilities = "x-ydb-client-capabilities" HeaderClientPid = "x-ydb-client-pid" // outgoing hints HintSessionBalancer = "session-balancer" // incomming headers HeaderServerHints = "x-ydb-server-hints" HeaderConsumedUnits = "x-ydb-consumed-units" // incoming hints HintSessionClose = "session-close" )
Variables ¶
This section is empty.
Functions ¶
func CallTrailerCallback ¶ added in v3.40.0
func WithAllowFeatures ¶ added in v3.29.2
WithAllowFeatures returns a copy of parent context with allowed client feature
func WithApplicationName ¶ added in v3.57.4
WithApplicationName returns a copy of parent context with custom user-agent info
func WithRequestType ¶ added in v3.13.0
WithRequestType returns a copy of parent context with custom request type
func WithTraceID ¶
WithTraceID returns a copy of parent context with traceID
func WithTrailerCallback ¶ added in v3.40.0
func WithTrailerCallback(ctx context.Context, callback MetadataCallback) context.Context
Types ¶
type Meta ¶
type Meta struct {
// contains filtered or unexported fields
}
func New ¶
func New( database string, credentials credentials.Credentials, trace *trace.Driver, opts ...Option, ) *Meta
type MetadataCallback ¶ added in v3.40.0
type Option ¶ added in v3.29.2
type Option func(m *Meta)
func AllowOption ¶ added in v3.29.2
func ForbidOption ¶ added in v3.29.2
func WithApplicationNameOption ¶ added in v3.57.4
func WithRequestTypeOption ¶ added in v3.29.2
Click to show internal directories.
Click to hide internal directories.