Documentation ¶
Index ¶
- func StreamCtxHandleGRPC() grpc.StreamClientInterceptor
- func UnaryCtxHandleGRPC() grpc.UnaryClientInterceptor
- type AppInterceptor
- func (i *AppInterceptor) AppGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (i *AppInterceptor) ErrorCodeGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (i *AppInterceptor) LoggingGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func (i *AppInterceptor) RecoveryGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamCtxHandleGRPC ¶
func StreamCtxHandleGRPC() grpc.StreamClientInterceptor
func UnaryCtxHandleGRPC ¶
func UnaryCtxHandleGRPC() grpc.UnaryClientInterceptor
Types ¶
type AppInterceptor ¶
type AppInterceptor struct {
App *kelvins.GRPCApplication
}
AppInterceptor ...
func (*AppInterceptor) AppGRPC ¶
func (i *AppInterceptor) AppGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
AppGRPC add app info in ctx.
func (*AppInterceptor) ErrorCodeGRPC ¶
func (i *AppInterceptor) ErrorCodeGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
func (*AppInterceptor) LoggingGRPC ¶
func (i *AppInterceptor) LoggingGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
loggingGRPC logs GRPC request.
func (*AppInterceptor) RecoveryGRPC ¶
func (i *AppInterceptor) RecoveryGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)
RecoveryGRPC recovers GRPC panic.
Click to show internal directories.
Click to hide internal directories.