-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add circuit breaker for upstream provider overload protection #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kacpersaw
wants to merge
27
commits into
main
Choose a base branch
from
kacpersaw/aibridge-circuit-breaker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7700a8f
feat: add circuit breaker for upstream provider overload protection
kacpersaw aad288c
chore: apply make fmt
kacpersaw 47253f1
refactor: use sony/gobreaker for circuit breakers with per-endpoint i…
kacpersaw 8cf2d18
refactor: align CircuitBreakerConfig fields with gobreaker.Settings
kacpersaw 8e44145
refactor: remove CircuitState, use gobreaker.State directly
kacpersaw 7af3bc1
refactor: implement circuit breaker as middleware with per-provider c…
kacpersaw 521df9b
docs: clarify noop behavior when provider not configured
kacpersaw c85b836
Update go.mod
kacpersaw e446954
fix: update metrics help text to reflect 0/0.5/1 gauge values
kacpersaw 1d2315e
refactor: add CircuitBreaker interface with NoopCircuitBreaker
kacpersaw 6994f89
refactor: use gobreaker Execute for proper half-open rejection handling
kacpersaw 6a7d578
refactor: remove unused circuitBreakers field and getter from Request…
kacpersaw b0ff0eb
use per-provider maps for endpoints
kacpersaw bee7a4d
make fmt
kacpersaw 98c7b7a
use mux.Handle for cb middleware
kacpersaw 7733266
Move CircuitBreakerConfig to the Provider struct
kacpersaw 7c7c85b
Update tests
kacpersaw 8943ef0
default noop func for onChange
kacpersaw 7d2dcb1
create CircuitBreakers per Provider instead of a global one and remov…
kacpersaw e3438f4
Update bridge.go
kacpersaw a32f246
fix format
kacpersaw e929098
Apply review suggestions
kacpersaw ab08de4
Apply review suggestions and add proper integration tests
kacpersaw 161db92
Add test to check circuit breaker config
kacpersaw 33ea4ae
Remove test
kacpersaw dbfab23
Remove TestCircuitBreaker_HalfOpenAndRecovery
kacpersaw 2af2875
Apply review suggestions
kacpersaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.