MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / HTTPPattern

Function HTTPPattern

runtime/context.go:410–413  ·  view source on GitHub ↗

HTTPPattern returns the HTTP path pattern struct relating to the HTTP handler, if one exists.

(ctx context.Context)

Source from the content-addressed store, hash-verified

408
409// HTTPPattern returns the HTTP path pattern struct relating to the HTTP handler, if one exists.
410func HTTPPattern(ctx context.Context) (Pattern, bool) {
411 v, ok := ctx.Value(httpPatternKey{}).(Pattern)
412 return v, ok
413}
414
415func withHTTPPattern(ctx context.Context, httpPattern Pattern) context.Context {
416 return context.WithValue(ctx, httpPatternKey{}, httpPattern)

Callers 1

Calls

no outgoing calls

Tested by 1