MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / initGRPC

Method initGRPC

pkg/component/grpc.go:33–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31)
32
33func (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
49func (c *Component) setupGRPC() (err error) {
50 for _, sub := range c.grpcSubsystems {

Callers 2

RegisterGRPCMethod · 0.95
NewFunction · 0.80

Implementers 1

Componentpkg/component/component.go

Calls 9

RateLimiterMethod · 0.95
ReplaceGrpcLoggerFunction · 0.92
NewFunction · 0.92
WithContextFillerFunction · 0.92
WithTrustedProxiesFunction · 0.92
WithLogIgnoreMethodsFunction · 0.92
WithRateLimiterFunction · 0.92
WithFieldMethod · 0.65

Tested by

no test coverage detected