server_interceptor

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamInjectLoggerInterceptor

func StreamInjectLoggerInterceptor(log logger.LoggerInterface) grpc.StreamServerInterceptor

StreamInjectLoggerInterceptor returns a new streaming server interceptor with logger injected.

func StreamInterceptor

func StreamInterceptor(log logger.LoggerInterface, opts ...logger_grpc.Option) grpc.StreamServerInterceptor

StreamInterceptor returns a new streaming server interceptor that log.

func UnaryInjectLoggerInterceptor

func UnaryInjectLoggerInterceptor(log logger.LoggerInterface) grpc.UnaryServerInterceptor

UnaryInjectLoggerInterceptor returns a new unary server interceptors with logger injected.

func UnaryInterceptor

func UnaryInterceptor(log logger.LoggerInterface, opts ...logger_grpc.Option) grpc.UnaryServerInterceptor

UnaryInterceptor returns a new unary server interceptors that log.

Types

type StreamWithContext

type StreamWithContext struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*StreamWithContext) Context

func (s *StreamWithContext) Context() context.Context

type StreamWrapper

type StreamWrapper struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func NewServerStreamWrapper

func NewServerStreamWrapper(stream grpc.ServerStream, context context.Context, options *logger_grpc.Options, l logger.LoggerInterface, loggerContext logger.Context) *StreamWrapper

func (*StreamWrapper) Context

func (s *StreamWrapper) Context() context.Context

func (*StreamWrapper) RecvMsg

func (s *StreamWrapper) RecvMsg(m interface{}) error

func (*StreamWrapper) SendHeader

func (s *StreamWrapper) SendHeader(md metadata.MD) error

func (*StreamWrapper) SendMsg

func (s *StreamWrapper) SendMsg(m interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL