MCPcopy Index your code
hub / github.com/cortexproject/cortex / AddQueryLimiterToContext

Function AddQueryLimiterToContext

pkg/util/limiter/query_limiter.go:53–55  ·  view source on GitHub ↗
(ctx context.Context, limiter *QueryLimiter)

Source from the content-addressed store, hash-verified

51}
52
53func AddQueryLimiterToContext(ctx context.Context, limiter *QueryLimiter) context.Context {
54 return context.WithValue(ctx, ctxKey, limiter)
55}
56
57// QueryLimiterFromContextWithFallback returns a QueryLimiter from the current context.
58// If there is not a QueryLimiter on the context it will return a new no-op limiter.

Calls

no outgoing calls