rpcmiddleware

package
v0.0.0-...-60b8695 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 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

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

ProxyHeaders is the configuration for the ProxyHeaders middleware.

func (*ProxyHeaders) ParseAndAddTrusted

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

func (h *ProxyHeaders) StreamServerInterceptor() grpc.StreamServerInterceptor

StreamServerInterceptor is the interceptor for streaming RPCs.

func (*ProxyHeaders) UnaryServerInterceptor

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