middleware

package
v3.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClientBreaker added in v3.24.0

func WithClientBreaker(br *breaker.Breaker, name string) grpc.UnaryClientInterceptor

WithClientBreaker adds breaker to client request.

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 WithUnaryClientContextTimeout added in v3.24.0

func WithUnaryClientContextTimeout(d time.Duration) grpc.UnaryClientInterceptor

WithUnaryClientContextTimeout adds timeout to unary client request context.

func WithUnaryClientInterceptors

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

WithUnaryClientInterceptors wraps multiple unary client interceptors in a single option.

func WithUnaryClientLogger added in v3.24.0

func WithUnaryClientLogger(l log.Logger) grpc.UnaryClientInterceptor

WithUnaryClientLogger adds the logger instance to the unary client request context.

func WithUnaryClientRecovery added in v3.24.0

func WithUnaryClientRecovery(recoveryOpts ...RecoveryFunc) grpc.UnaryClientInterceptor

WithUnaryServerRecovery returns an interceptor that recovers from panics.

func WithUnaryClientStats added in v3.24.0

func WithUnaryClientStats(s stats.Stats) grpc.UnaryClientInterceptor

WithUnaryClientStats adds the stats instance to the unary client request context.

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