middleware

package
v3.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithStreamClientInterceptors

func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption

WithStreamClientInterceptors wraps multiple stream client interceptors in a single option.

func WithStreamServerInterceptors

func WithStreamServerInterceptors(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption

WithStreamServerInterceptors wraps multiple stream server interceptors in a single option.

func WithStreamServerLogger

func WithStreamServerLogger(l log.Logger) grpc.StreamServerInterceptor

WithStreamServerLogger adds the stats instance to the stream context.

func WithStreamServerRecovery

func WithStreamServerRecovery(opts ...RecoveryFunc) grpc.StreamServerInterceptor

WithStreamServerRecovery returns an interceptor that recovers from panics.

func WithStreamServerStats

func WithStreamServerStats(s stats.Stats) grpc.StreamServerInterceptor

WithStreamServerStats adds the stats instance to the stream context.

func WithUnaryClientInterceptors

func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption

WithUnaryClientInterceptors wraps multiple unary client interceptors in a single option.

func WithUnaryServerInterceptors

func WithUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption

WithUnaryServerInterceptors wraps multiple unary server interceptors in a single option.

func WithUnaryServerLogger

func WithUnaryServerLogger(l log.Logger) grpc.UnaryServerInterceptor

WithUnaryServerLogger adds the logger instance to the unary request context.

func WithUnaryServerRecovery

func WithUnaryServerRecovery(opts ...RecoveryFunc) grpc.UnaryServerInterceptor

WithUnaryServerRecovery returns an interceptor that recovers from panics.

func WithUnaryServerStats

func WithUnaryServerStats(s stats.Stats) grpc.UnaryServerInterceptor

WithUnaryServerStats adds the stats instance to the unary request context.

Types

type RecoveryFunc added in v3.17.0

type RecoveryFunc func(*recoveryConfig)

RecoveryFunc is used to configure the recovery interceptors.

func WithoutStack added in v3.17.0

func WithoutStack() RecoveryFunc

WithoutStack disables the stack trace dump from the recovery log.

Jump to

Keyboard shortcuts

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