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

Function grpcIsClusterAuthCall

pkg/ratelimit/grpc.go:42–44  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

40}
41
42func grpcIsClusterAuthCall(ctx context.Context) bool {
43 return rpcmetadata.FromIncomingContext(ctx).AuthType == clusterauth.AuthType
44}
45
46// UnaryServerInterceptor returns a gRPC unary server interceptor that rate limits incoming gRPC requests.
47func UnaryServerInterceptor(limiter Interface) grpc.UnaryServerInterceptor {

Callers 2

UnaryServerInterceptorFunction · 0.85
StreamServerInterceptorFunction · 0.85

Calls 1

FromIncomingContextFunction · 0.92

Tested by

no test coverage detected