meta

package
v1.167.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// RequestIDKey for meta.
	RequestIDKey = "requestId"

	// UserAgentKey for meta.
	UserAgentKey = "userAgent"

	// ServiceKey for meta.
	ServiceKey = "service"

	// PathKey for meta.
	PathKey = "path"

	// MethodKey for meta.
	MethodKey = "method"

	// CodeKey for meta.
	CodeKey = "code"

	// DurationKey for meta.
	DurationKey = "duration"

	// StartTimeKey for meta.
	StartTimeKey = "startTime"

	// DeadlineKey for meta.
	DeadlineKey = "deadline"
)

Variables

View Source
var Module = fx.Options(
	fx.Provide(NewKey),
)

Module for fx.

Functions

func NewKey added in v1.166.0

func NewKey(cfg *limiter.Config) limiter.KeyFunc

NewKey for meta.

func RequestID

func RequestID(ctx context.Context) meta.Valuer

RequestID for transport.

func UserAgent

func UserAgent(ctx context.Context) meta.Valuer

UserAgent for transport.

func WithRequestID

func WithRequestID(ctx context.Context, id meta.Valuer) context.Context

WithRequestID for transport.

func WithTraceID added in v1.128.0

func WithTraceID(ctx context.Context, id meta.Valuer) context.Context

WithTraceID for transport.

func WithUserAgent

func WithUserAgent(ctx context.Context, userAgent meta.Valuer) context.Context

WithUserAgent for transport.

Types

This section is empty.

Jump to

Keyboard shortcuts

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