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 attack :", zap.Error(errors.New(buf.String()))) return status.Errorf(codes.Internal, "%s", p) }) // Shared options for the logger, with a custom gRPC code to log level function. Opts = []grpc_recovery.Option{ grpc_recovery.WithRecoveryHandler(RecoveryCustomFunc), } UnaryServerInterceptor = grpc_recovery.UnaryServerInterceptor(Opts...) GrpcServerOption grpc.ServerOption )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.