Add throttle to context
This commit is contained in:
@@ -24,9 +24,6 @@ type Payload struct {
|
||||
// CallFunction allows burst rate limiting client calls with the
|
||||
// payloads.
|
||||
func CallFunction(ctx context.Context, client Client, payload *Payload, throttle <-chan time.Time) {
|
||||
//ctx, cancel := context.WithCancel(ctx)
|
||||
// defer cancel()
|
||||
|
||||
<-throttle // rate limit our client calls
|
||||
client.Call(payload)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user