Documentation ¶
Index ¶
- func RequestIDStreamServerInterceptor() grpc.StreamServerInterceptor
- func RequestIDUnaryServerInterceptor() grpc.UnaryServerInterceptor
- type ProxyHeaders
- type StatsHandlers
- func (s StatsHandlers) HandleConn(ctx context.Context, stats stats.ConnStats)
- func (s StatsHandlers) HandleRPC(ctx context.Context, stats stats.RPCStats)
- func (s StatsHandlers) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
- func (s StatsHandlers) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestIDStreamServerInterceptor ¶
func RequestIDStreamServerInterceptor() grpc.StreamServerInterceptor
RequestIDStreamServerInterceptor returns a new streaming server interceptor that that inserts Request IDs if not present.
func RequestIDUnaryServerInterceptor ¶
func RequestIDUnaryServerInterceptor() grpc.UnaryServerInterceptor
RequestIDUnaryServerInterceptor returns a new unary server interceptor that inserts Request IDs if not present.
Types ¶
type ProxyHeaders ¶ added in v3.10.2
ProxyHeaders is the configuration for the ProxyHeaders middleware.
func (*ProxyHeaders) ParseAndAddTrusted ¶ added in v3.10.2
func (h *ProxyHeaders) ParseAndAddTrusted(cidrs ...string) error
ParseAndAddTrusted parses a list of CIDRs and adds them to the list of trusted ranges.
func (*ProxyHeaders) StreamServerInterceptor ¶ added in v3.10.2
func (h *ProxyHeaders) StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor is the interceptor for streaming RPCs.
func (*ProxyHeaders) UnaryServerInterceptor ¶ added in v3.10.2
func (h *ProxyHeaders) UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor is the interceptor for unary RPCs.
type StatsHandlers ¶
StatsHandlers is a slice of stats.Handler that implements stats.Handler. Calls are delegated to all handlers in order.
func (StatsHandlers) HandleConn ¶
func (s StatsHandlers) HandleConn(ctx context.Context, stats stats.ConnStats)
HandleConn implements stats.Handler.
func (StatsHandlers) HandleRPC ¶
func (s StatsHandlers) HandleRPC(ctx context.Context, stats stats.RPCStats)
HandleRPC implements stats.Handler.
func (StatsHandlers) TagConn ¶
func (s StatsHandlers) TagConn(ctx context.Context, info *stats.ConnTagInfo) context.Context
TagConn implements stats.Handler.
func (StatsHandlers) TagRPC ¶
func (s StatsHandlers) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context
TagRPC implements stats.Handler.
Directories ¶
Path | Synopsis |
---|---|
Package discover implements a gRPC discovery middleware.
|
Package discover implements a gRPC discovery middleware. |
Package fillcontext implements a gRPC middleware that fills global context into a call context.
|
Package fillcontext implements a gRPC middleware that fills global context into a call context. |
Package hooks implements a gRPC middleware that executes service and method hooks.
|
Package hooks implements a gRPC middleware that executes service and method hooks. |
Package rpclog implements a gRPC logging middleware.
|
Package rpclog implements a gRPC logging middleware. |
Package rpctracer implements a gRPC tracing middleware.
|
Package rpctracer implements a gRPC tracing middleware. |
Package sentry implements gRPC middleware that forwards errors in RPCs to Sentry
|
Package sentry implements gRPC middleware that forwards errors in RPCs to Sentry |
Package validator implements a gRPC middleware that defines custom validators that are invoked when the service is called.
|
Package validator implements a gRPC middleware that defines custom validators that are invoked when the service is called. |
Package warning communicates warnings over gRPC headers.
|
Package warning communicates warnings over gRPC headers. |