governor icon indicating copy to clipboard operation
governor copied to clipboard

Add async waiting for n cells in keyed stores

Open patlkli opened this issue 3 years ago • 0 comments

#10 added the until_n_ready{,_with_jitter} functions to asynchronously wait for n cells in a direct rate limiter.

This adds the keyed variants until_key_n_ready{,_with_jitter} of these functions to wait for n cells to be available for a certain key.

I'm not sure, though, if the InsufficientCapacity error shouldn't be moved out of state::direct::future to somewhere more general. If you have any suggestions, let me know.

patlkli avatar Jan 05 '22 23:01 patlkli