()
| 31 | ) |
| 32 | |
| 33 | func (c *Component) initGRPC() { |
| 34 | if c.grpcLogger == nil { |
| 35 | c.grpcLogger = c.logger.WithField("namespace", "grpc") |
| 36 | } |
| 37 | rpclog.ReplaceGrpcLogger(c.grpcLogger) |
| 38 | |
| 39 | c.GRPC = rpcserver.New( |
| 40 | c.ctx, |
| 41 | rpcserver.WithContextFiller(c.FillContext), |
| 42 | rpcserver.WithTrustedProxies(c.config.GRPC.TrustedProxies...), |
| 43 | rpcserver.WithLogIgnoreMethods(c.config.GRPC.LogIgnoreMethods), |
| 44 | rpcserver.WithCorrelationIDsIgnoreMethods(c.config.GRPC.CorrelationIDsIgnoreMethods), |
| 45 | rpcserver.WithRateLimiter(c.RateLimiter()), |
| 46 | ) |
| 47 | } |
| 48 | |
| 49 | func (c *Component) setupGRPC() (err error) { |
| 50 | for _, sub := range c.grpcSubsystems { |
no test coverage detected