Skip to content

Conversation

AndreasBergmeier6176
Copy link

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.

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.
@ndyakov
Copy link
Member

ndyakov commented Mar 13, 2025

@AndreasBergmeier6176 Returning context from getConn doesn't look good to me. Let's see if we can find another way to have a meaningful context in the limiter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants