go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

Allow for tracking state in Limiter

Open AndreasBergmeier6176 opened this issue 4 months ago • 0 comments

Extend Allow and ReportResult functions to handle a Context. Allow can override the passed in Context. The returned Context is then further passed down to ReportResult. Using this Context it is then possible to store values/track state between Allow and ReportResult calls.

Without this tracking HalfOpen/Generation state is hard to implement efficiently for Circuit Breakers.

AndreasBergmeier6176 avatar Oct 10 '24 14:10 AndreasBergmeier6176