aklepatc ([personal profile] aklepatc) wrote2024-04-22 10:34 am
Entry tags:

Exponential Backoff in Golang: take two

Most important change: float multiplier. Special thanks to [personal profile] juan_gandhi for this discussion!

https://github.com/aklepatc/backoff/blob/main/backoff.go
juan_gandhi: (Default)

[personal profile] juan_gandhi 2024-04-22 04:59 pm (UTC)(link)

I don't know go; so this piece looks (to me) just weird:

func expBackoff(
    ctx context.Context,
    call func() error,
    limit int,
    delay time.Duration,
    multiplier float64,
) error {

Just the language.

[personal profile] sassa_nf 2024-04-22 05:14 pm (UTC)(link)
Hmmm... names and types

[personal profile] sassa_nf 2024-04-22 05:51 pm (UTC)(link)
To me - no. I started typing before you responded to juan gandhi, my response doesn't really add value to your explanation.