Documentation ¶
Index ¶
- type BaseContextInterceptor
- func (bi *BaseContextInterceptor) StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) (retErr error)
- func (bi *BaseContextInterceptor) UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, retErr error)
- type LoggingInterceptor
- func (li *LoggingInterceptor) StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) (retErr error)
- func (li *LoggingInterceptor) UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (resp interface{}, retErr error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseContextInterceptor ¶
type BaseContextInterceptor struct {
// contains filtered or unexported fields
}
func NewBaseContextInterceptor ¶
func NewBaseContextInterceptor(ctx context.Context) *BaseContextInterceptor
func (*BaseContextInterceptor) StreamServerInterceptor ¶
func (bi *BaseContextInterceptor) StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (retErr error)
func (*BaseContextInterceptor) UnaryServerInterceptor ¶
func (bi *BaseContextInterceptor) UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, retErr error)
type LoggingInterceptor ¶
func NewLoggingInterceptor ¶
func NewLoggingInterceptor(ctx context.Context) *LoggingInterceptor
NewLoggingInterceptor creates a new interceptor that logs method start and end. Note that the provided context is only for warnings generated by this function. It is not the root logger; that is injected by the BaseContextInterceptor.
func (*LoggingInterceptor) StreamServerInterceptor ¶
func (li *LoggingInterceptor) StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) (retErr error)
func (*LoggingInterceptor) UnaryServerInterceptor ¶
func (li *LoggingInterceptor) UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, retErr error)
Click to show internal directories.
Click to hide internal directories.