Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandlerOnGRPC ¶
func NewHandlerOnGRPC(ctx context.Context, healthService *service.HealthService, claculatorService *service.CalculatorService, logger *zap.Logger) (http.Handler, error)
NewHandlerOnGRPC 创建基于GRPC的服务处理器
func NewHandlerOnHTTP ¶
func NewHandlerOnHTTP(ctx context.Context, healthService *service.HealthService, claculatorService *service.CalculatorService, logger *zap.Logger) (http.Handler, error)
NewHandlerOnHTTP 创建基于HTTP的服务处理器
func ServerMiddlewares ¶
func ServerMiddlewares() endpoint.Middleware
ServerMiddlewares 服务端endpoint中间件
Types ¶
type ErrorLogHandler ¶
type ErrorLogHandler struct {
// contains filtered or unexported fields
}
ErrorLogHandler 错误日志处理器 实现kit/transport.ErrorHandler接口 用来替换默认的错误日志处理器
func NewErrorLogHandler ¶
func NewErrorLogHandler(logger *zap.Logger) *ErrorLogHandler
NewErrorLogHandler 创建错误日志处理器
Click to show internal directories.
Click to hide internal directories.