Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorTranslationUnaryServerInterceptor = func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { resp, err = handler(ctx, req) return resp, translateError(err) } ErrorTranslationStreamServerInterceptor = func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { return translateError(handler(srv, ss)) } )
Functions ¶
func PanicLoggerStreamServerInterceptor ¶
func PanicLoggerStreamServerInterceptor(log *log.Entry) grpc.StreamServerInterceptor
PanicLoggerStreamServerInterceptor returns a new streaming server interceptor for recovering from panics and returning error
func PanicLoggerUnaryServerInterceptor ¶
func PanicLoggerUnaryServerInterceptor(log *log.Entry) grpc.UnaryServerInterceptor
PanicLoggerUnaryServerInterceptor returns a new unary server interceptor for recovering from panics and returning error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.