Add a ThrottledWorker
themue opened this issue · comments
Frank Mueller commented
- Add a
ThrottledWorker
- It is created with a
Contex
, aLimit
, and aBurst
as arguments -
Limit
is a number of requests per second -
Burst
is the number of requests at a time
Frank Mueller commented
Ensure a graceful context shutdown. It has to append a shutdown actionTask and block future input with a shutdown error.
Frank Mueller commented
Worker uses a flexible queue as buffer providing a function for input actionTask and a function returning a channel for an iteration pattern.