log

package
v0.0.0-...-f4159b9 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor(opts ...InterceptOption) grpc.StreamServerInterceptor

StreamServerInterceptor returns an interceptor for logging grpc streaming messages

func UnaryServerInterceptor

func UnaryServerInterceptor(opts ...InterceptOption) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns an interceptor for logging grpc unary requests

Types

type InterceptOption

type InterceptOption func(*interceptConfig)

InterceptOption is used to configure interceptors

func InterceptWithReqModifier

func InterceptWithReqModifier(method string, modifier SafeLoggingModifier) InterceptOption

InterceptWithReqModifier returns an interceptOption to pass to Intercept* functions

func InterceptWithRespModifier

func InterceptWithRespModifier(method string, modifier SafeLoggingModifier) InterceptOption

InterceptWithRespModifier returns an interceptOption to pass to Intercept* functions

type SafeLoggingModifier

type SafeLoggingModifier interface {
	Handles(interface{}) bool
	Copy(interface{}) interface{}
	Modify(interface{}) interface{}
}

SafeLoggingModifier provides functions needed for this middleware to safely modify copies of data on the chain

Jump to

Keyboard shortcuts

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