interceptor

package
v0.0.0-...-e08e33e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestID = "x-request-id"
)

Variables

This section is empty.

Functions

func AccessLog

func AccessLog(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func ErrorLog

func ErrorLog(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

普通错误记录的日志拦截器

func Recovery

func Recovery(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

异常捕抓拦截器

func RequestIDClientInterceptor

func RequestIDClientInterceptor() grpc.UnaryClientInterceptor

func RequestIDServerInterceptor

func RequestIDServerInterceptor() grpc.UnaryServerInterceptor

func StreamContextTimeout

func StreamContextTimeout() grpc.StreamClientInterceptor

func UnaryContextTimeout

func UnaryContextTimeout() grpc.UnaryClientInterceptor

Types

This section is empty.

Jump to

Keyboard shortcuts

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