client_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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamInjectLoggerInterceptor

func StreamInjectLoggerInterceptor(log logger.LoggerInterface) grpc.StreamClientInterceptor

StreamInjectLoggerInterceptor returns a new streaming client interceptor with logger injected.

func StreamInterceptor

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

StreamInterceptor returns a new streaming client interceptor that optionally logs the execution of external gRPC calls.

func UnaryInjectLoggerInterceptor

func UnaryInjectLoggerInterceptor(log logger.LoggerInterface, opts ...logger_grpc.Option) grpc.UnaryClientInterceptor

UnaryInjectLoggerInterceptor returns a new unary client interceptor with logger injected.

func UnaryInterceptor

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

UnaryInterceptor returns a new unary client interceptor that optionally logs the execution of external gRPC calls.

Types

type StreamWrapper

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

func NewClientStreamWrapper

func NewClientStreamWrapper(stream grpc.ClientStream, options *logger_grpc.Options, l logger.LoggerInterface, loggerContext logger.Context) *StreamWrapper

func (*StreamWrapper) RecvMsg

func (s *StreamWrapper) RecvMsg(m interface{}) 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