interceptors

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

grpc-debug-interceptors

A little Go utility for tracing GRPC conversations to a JSON file for easy debugging

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugClientInterceptor

func DebugClientInterceptor(metadata interface{}) grpc.UnaryClientInterceptor

Like debugServerInterceptor but for GRPC client connections.

func DebugServerInterceptor

func DebugServerInterceptor(metadata interface{}) 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 DebugStreamClientInterceptor

func DebugStreamClientInterceptor(metadata interface{}) grpc.StreamClientInterceptor

Like debugClientInterceptor but for streaming calls.

func DebugStreamServerInterceptor

func DebugStreamServerInterceptor(metadata interface{}) grpc.StreamServerInterceptor

Like debugServerInterceptor but for streaming calls.

func InitDebugInterceptors

func InitDebugInterceptors(logFile string) error

Enables gRPC interceptors for the current process. Intercepted gRPC conversations are logged to the given logFile in JSON format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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