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

Function grpcStreamAcceptResource

pkg/ratelimit/resource.go:104–113  ·  view source on GitHub ↗

grpcStreamAcceptResource represents a new gRPC server stream.

(ctx context.Context, fullMethod string)

Source from the content-addressed store, hash-verified

102
103// grpcStreamAcceptResource represents a new gRPC server stream.
104func grpcStreamAcceptResource(ctx context.Context, fullMethod string) Resource {
105 key := fmt.Sprintf("grpc:stream:accept:%s", fullMethod)
106 if authTokenID := authTokenID(ctx); authTokenID != unauthenticated {
107 key = fmt.Sprintf("%s:token:%s", key, authTokenID)
108 }
109 return &resource{
110 key: key,
111 classes: []string{fmt.Sprintf("grpc:stream:accept:%s", fullMethod), "grpc:stream:accept"},
112 }
113}
114
115// grpcStreamUpResource represents client messages for a gRPC server stream.
116func grpcStreamUpResource(ctx context.Context, fullMethod string) Resource {

Callers 1

StreamServerInterceptorFunction · 0.85

Calls 1

authTokenIDFunction · 0.85

Tested by

no test coverage detected