Configurable default rate limit
Created by: mollylogue
Enable specifying a default rate limit in the site config and fall back on this rate limit if no rate limiter found in the registry
Notes:
- I know that looking up the config value in this library is not the best pattern. The challenge is that we're initializing a default registry and just using that in many locations throughout our code. It would be best if we defined it once at the top level and fetched/passed in the config value there, but the code is not currently set up to do this. I'm open to thoughts on better ways to achieve this, if anyone has any.
Closes https://github.com/sourcegraph/sourcegraph/issues/33551
Test plan
This is tough to test, since all of our api calls to external services should theoretically be found in the rate limit registry or fall back on their own defaults. Open to thoughts on how to best test this beyond unit tests.