(ctx context.Context, limiter *QueryLimiter)
| 51 | } |
| 52 | |
| 53 | func 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. |
no outgoing calls