serverinterceptors

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUnaryTimeout  = 10 * time.Second
	DefaultStreamTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

func AuthStream

func AuthStream(authFunc grpc_auth.AuthFunc) grpc.StreamServerInterceptor

func AuthUnary

func AuthUnary(authFunc grpc_auth.AuthFunc) grpc.UnaryServerInterceptor

func RateLimitStream

func RateLimitStream(limiter ratelimit.Limiter) grpc.StreamServerInterceptor

func RateLimitUnary

func RateLimitUnary(limiter ratelimit.Limiter) grpc.UnaryServerInterceptor

func SetLog

func SetLog(log logger.Logger)

func TimeoutStream

func TimeoutStream(t time.Duration) grpc.StreamServerInterceptor

TimeoutStream returns a new streaming server interceptor for panic recovery.

func TimeoutUnary

func TimeoutUnary(t time.Duration) grpc.UnaryServerInterceptor

TimeoutUnary returns a new unary server interceptor for OpenTracing.

Types

type RateLimit

type RateLimit struct{}

func (RateLimit) Limit

func (r RateLimit) Limit() bool

Jump to

Keyboard shortcuts

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