rpcmiddleware

package
v3.13.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

type ProxyHeaders struct {
	Trusted []*net.IPNet
}

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

type StatsHandlers []stats.Handler

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

TagConn implements stats.Handler.

func (StatsHandlers) TagRPC

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 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.

Jump to

Keyboard shortcuts

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