MCPcopy
hub / github.com/grpc/grpc-go / newURLPathMatcher

Function newURLPathMatcher

internal/xds/rbac/matchers.go:311–317  ·  view source on GitHub ↗
(pathMatcher *v3matcherpb.PathMatcher)

Source from the content-addressed store, hash-verified

309}
310
311func newURLPathMatcher(pathMatcher *v3matcherpb.PathMatcher) (*urlPathMatcher, error) {
312 stringMatcher, err := internalmatcher.StringMatcherFromProto(pathMatcher.GetPath())
313 if err != nil {
314 return nil, err
315 }
316 return &urlPathMatcher{stringMatcher: stringMatcher}, nil
317}
318
319func (upm *urlPathMatcher) match(data *rpcData) bool {
320 return upm.stringMatcher.Match(data.fullMethod)

Callers 2

matchersFromPermissionsFunction · 0.85
matchersFromPrincipalsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected