middleware

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Panic handler prints the stack trace when recovering from a panic.
	RecoveryCustomFunc grpc_recovery.RecoveryHandlerFunc = grpc_recovery.RecoveryHandlerFunc(func(p interface{}) error {
		buf := bytes.NewBuffer(debug.Stack())
		log.Error("Panic occurred", zap.Error(errors.New(buf.String())))
		return status.Errorf(codes.Internal, "%s", p)
	})
	RecoveryUnaryServerInterceptor = grpc_recovery.UnaryServerInterceptor(

		grpc_recovery.WithRecoveryHandler(RecoveryCustomFunc),
	)
	PrometheusUnaryServerInterceptor = grpc_prometheus.UnaryServerInterceptor
	GrpcServerOption                 grpc.ServerOption
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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