You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently when using a List function it provides no way to mitigate rate limit errors.
Describe the solution you'd like
Ideally a way to rate limit requests. It could be achieved by passing in a ratelimiter interface to the function either as a new function parameter, in params, or as an option.
type RateLimiter interface{
Take()
}
Given the current interface I would claim creating a new ratelimiter option is the cleanest/easiest way.
Describe alternatives you've considered
Currently the only way to incorporate a rate limiter is before the initial List function and then before the iter.Next() function is called. But in a concurrent application this is insufficient.
ratelimiter.Take()
iter := c.ListAggs(context.TODO(), params, opts...)
for iter.Next() {
log.Print(iter.Item()) // do something with the current value
ratelimiter.Take()
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently when using a List function it provides no way to mitigate rate limit errors.
Describe the solution you'd like
Ideally a way to rate limit requests. It could be achieved by passing in a ratelimiter interface to the function either as a new function parameter, in params, or as an option.
Given the current interface I would claim creating a new ratelimiter option is the cleanest/easiest way.
Describe alternatives you've considered
Currently the only way to incorporate a rate limiter is before the initial List function and then before the iter.Next() function is called. But in a concurrent application this is insufficient.
The text was updated successfully, but these errors were encountered: