aklepatc (
aklepatc
) wrote
2024
-
03
-
05
06:35 pm
Entry tags:
go
,
golang
Exponential Backoff in Golang
https://go.dev/play/p/sFjrKyGmd0y
TODO: add some meaningful test logic.
Flat
|
Top-Level Comments Only
no subject
sassa_nf
2024-03-06 02:22 pm (UTC)
(
link
)
nit: callback might want the ctx, too
no subject
aklepatc
2024-03-06 03:00 pm (UTC)
(
link
)
Sure. The idea is you cannot have it at the very "bottom" though.
You always end up calling some legacy API which is not interruptible.
no subject
aklepatc
2024-03-06 04:01 pm (UTC)
(
link
)
The callback is intended to represent something heavy weight, clumsy, unreliable and un-interuptable.
no subject
sassa_nf
2024-03-06 06:56 pm (UTC)
(
link
)
Shipit!
no subject
aklepatc
2024-03-06 07:14 pm (UTC)
(
link
)
Oh, I already failed at that (figuratively speaking). This coding exercise is the end result of an interview that resulted in rejection. Lol.
I do hope to reuse the approach in the future though.
9 comments
Post a new comment
Flat
|
Top-Level Comments Only
[
Home
|
Post Entry
|
Log in
|
Search
|
Browse Options
|
Site Map
]
no subject
no subject
You always end up calling some legacy API which is not interruptible.
no subject
no subject
no subject
I do hope to reuse the approach in the future though.