go-redis
go-redis copied to clipboard
Allow for tracking state in Limiter
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.