Documentation ¶
Index ¶
Constants ¶
View Source
const RecoveryExplanation = "Something went wrong"
RecoveryExplanation 异常消息
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶ added in v1.0.2
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 ZapRecoveryHandler ¶
type ZapRecoveryHandler struct {
// contains filtered or unexported fields
}
ZapRecoveryHandler todo
func NewZapRecoveryHandler ¶
func NewZapRecoveryHandler() *ZapRecoveryHandler
NewZapRecoveryHandler todo
func (*ZapRecoveryHandler) Handle ¶
func (h *ZapRecoveryHandler) Handle(ctx context.Context, p interface{}) error
Handle todo
func (*ZapRecoveryHandler) SetLogger ¶
func (h *ZapRecoveryHandler) SetLogger(l logger.Logger) *ZapRecoveryHandler
SetLogger todo
Click to show internal directories.
Click to hide internal directories.