I've been trying to find a way to write a generic RoundTripper that would examine GitHub headers and/or the go-github errors to detect when quota has run out and wait for the quota reset.
Because checkRateLimitBeforeDo get's called and returns early, there isn't a way for the RoundTripper to handle waiting / retries.
The benefit of doing this in the RoundTripper is that it'll apply to all API calls, but without it, each call needs to be wrapped with retry and quota logic.
Is there another approach I can take for this?
I've been trying to find a way to write a generic RoundTripper that would examine GitHub headers and/or the go-github errors to detect when quota has run out and wait for the quota reset.
Because
checkRateLimitBeforeDoget's called and returns early, there isn't a way for the RoundTripper to handle waiting / retries.The benefit of doing this in the RoundTripper is that it'll apply to all API calls, but without it, each call needs to be wrapped with retry and quota logic.
Is there another approach I can take for this?