Documentation ¶
Index ¶
Constants ¶
View Source
const RecoveryExplanation = "Something went wrong"
RecoveryExplanation 异常消息
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
Handler is a function that recovers from the panic `p` by returning an `error`. The context can be used to extract request scoped metadata and context values.
type Interceptor ¶
type Interceptor struct {
// contains filtered or unexported fields
}
Interceptor todo
func (*Interceptor) StreamServerInterceptor ¶
func (i *Interceptor) StreamServerInterceptor() grpc.StreamServerInterceptor
StreamServerInterceptor todo
func (*Interceptor) UnaryServerInterceptor ¶
func (i *Interceptor) UnaryServerInterceptor() grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptor for auth.
type ZeroLogRecoveryHandler ¶
type ZeroLogRecoveryHandler struct {
// contains filtered or unexported fields
}
ZeroLogRecoveryHandler todo
func NewZeroLogRecoveryHandler ¶
func NewZeroLogRecoveryHandler() *ZeroLogRecoveryHandler
NewZeroLogRecoveryHandler todo
func (*ZeroLogRecoveryHandler) Handle ¶
func (h *ZeroLogRecoveryHandler) Handle(ctx context.Context, p interface{}) error
Handle todo
func (*ZeroLogRecoveryHandler) SetLogger ¶
func (h *ZeroLogRecoveryHandler) SetLogger(l *zerolog.Logger) *ZeroLogRecoveryHandler
SetLogger todo
Click to show internal directories.
Click to hide internal directories.