rpcdebug

package
v3.116.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugInterceptor

type DebugInterceptor struct {
	// contains filtered or unexported fields
}

func NewDebugInterceptor

func NewDebugInterceptor(opts DebugInterceptorOptions) (*DebugInterceptor, error)

Each LogFile should have a unique instance of DebugInterceptor for proper locking.

func (*DebugInterceptor) DebugClientInterceptor

func (i *DebugInterceptor) DebugClientInterceptor(opts LogOptions) grpc.UnaryClientInterceptor

Like debugServerInterceptor but for GRPC client connections.

func (*DebugInterceptor) DebugServerInterceptor

func (i *DebugInterceptor) DebugServerInterceptor(opts LogOptions) grpc.UnaryServerInterceptor

Logs all gRPC converations in JSON format.

To enable, call InitDebugInterceptors first in your process main to configure the location of the Go file.

func (*DebugInterceptor) DebugStreamClientInterceptor

func (i *DebugInterceptor) DebugStreamClientInterceptor(opts LogOptions) grpc.StreamClientInterceptor

Like debugClientInterceptor but for streaming calls.

func (*DebugInterceptor) DebugStreamServerInterceptor

func (i *DebugInterceptor) DebugStreamServerInterceptor(opts LogOptions) grpc.StreamServerInterceptor

Like debugServerInterceptor but for streaming calls.

func (*DebugInterceptor) DialOptions

func (i *DebugInterceptor) DialOptions(opts LogOptions) []grpc.DialOption

func (*DebugInterceptor) ServerOptions

func (i *DebugInterceptor) ServerOptions(opts LogOptions) []grpc.ServerOption

type DebugInterceptorOptions

type DebugInterceptorOptions struct {
	LogFile string
	Mutex   *sync.Mutex
}

type LogOptions

type LogOptions struct {
	Metadata interface{}
}

Jump to

Keyboard shortcuts

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