Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClientMetaHandler = client.WithMetaHandler(&MetaTTHeaderHandler{})
View Source
var ErrHandlerOption = client.WithErrorHandler(func(ctx context.Context, err error) error { transErr, ok := err.(*remote.TransError) if ok && transErr.TypeID() == 6 { err = e.RPCClientErrorCodeError.SetErr(err, strings.ReplaceAll(transErr.Error(), "biz error: ", "")) } else { err = e.RPCClientErrorCodeError.SetErr(err, "数据访问失败") } return err })
ErrHandlerOption 业务错误再封装
View Source
var ServerMetaHandler = server.WithMetaHandler(&MetaTTHeaderHandler{})
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.