Documentation ¶
Index ¶
- Constants
- Variables
- func IPAddr(ctx context.Context) meta.Valuer
- func NewKey(cfg *limiter.Config) limiter.KeyFunc
- func RequestID(ctx context.Context) meta.Valuer
- func UserAgent(ctx context.Context) meta.Valuer
- func WithIPAddr(ctx context.Context, addr meta.Valuer) context.Context
- func WithRequestID(ctx context.Context, id meta.Valuer) context.Context
- func WithTraceID(ctx context.Context, id meta.Valuer) context.Context
- func WithUserAgent(ctx context.Context, userAgent meta.Valuer) context.Context
Constants ¶
View Source
const ( // UserAgentKey for meta. UserAgentKey = "userAgent" // IPAddrKey for meta. IPAddrKey = "ipAddr" )
View Source
const ( // RequestIDKey for meta. RequestIDKey = "requestId" // 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" )
Variables ¶
Module for fx.
Functions ¶
func WithIPAddr ¶ added in v1.168.0
WithIPAddr for transport.
func WithRequestID ¶
WithRequestID for transport.
func WithTraceID ¶ added in v1.128.0
WithTraceID for transport.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.