Add throttle to context

This commit is contained in:
2024-11-11 21:43:12 +01:00
parent ac5837e26a
commit 47ed047f7e
2 changed files with 14 additions and 18 deletions

View File

@@ -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)
}