ydb-go-sdk icon indicating copy to clipboard operation
ydb-go-sdk copied to clipboard

feat: ratelimiter for second+ attempts of retryer call

Open asmyasnikov opened this issue 10 months ago • 0 comments

fro example:

// package retry 
type Limiter interface {
	Acquire(ctx context.Context) error
}

// another package
var _ retry.Limiter = (*myRateLimiter)(nil)

err := retry.Retry(ctx, func(ctx) error {
  // lambda for attempt
}, retry.WithLimiter(myRateLimiter))

asmyasnikov avatar Apr 05 '24 16:04 asmyasnikov