Skip to content

janrs-io/Jgrpc-pgv-interceptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jgrpc-pgv-interceptor

gRpc-Gateway PGV 中间件

Usage

	grpcServer := grpc.NewServer(
		grpc.ChainStreamInterceptor(
			// otel 链路追踪
			otelgrpc.StreamServerInterceptor(),
		),
		grpc.ChainUnaryInterceptor(
			// otel 链路追踪
			otelgrpc.UnaryServerInterceptor(),
			// PGV 中间件
			Jgrpc_pgv_interceptor.ValidationUnaryInterceptor,
		),
	)