grpc

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HeaderRequestID header name for request id
	HeaderRequestID = "X-Request-Id"
)

Variables

This section is empty.

Functions

func StreamServerInterceptor

func StreamServerInterceptor(config GRpcConfig) grpc.StreamServerInterceptor

StreamServerInterceptor returns a new stream server interceptors that performs logging

func UnaryServerInterceptor

func UnaryServerInterceptor(config GRpcConfig) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptors that performs logging

Types

type GRpcConfig

type GRpcConfig struct {
	// Logger logx.Logger instance
	Logger *trlogger.TrLogger
	// Excludes ignore paths
	Excludes []string
	// ExcludeGRpcGatewayRequest ignore gRpc-Gateway request
	ExcludeGRpcGatewayRequest bool
}

GRpcConfig gRpc日志打印配置

Jump to

Keyboard shortcuts

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