How github/freno-client works
This gem provides a Faraday-backed Freno client and a higher-level write throttler. The main flow maps client operations to request types, sends HTTP requests, and turns responses into results; the throttler maps a workload context to stores, checks them through the client, retries when needed, then permits the work. README-described decorators and throttler collaborators are included. Unsampled request and instrumenter internals are represented only where documented or registered; edges without direct evidence are omitted.
Main entry points: throttler.rb Throttler · client.rb Client API · request.rb HTTP request base · check.rb Write check
Components 18
Freno client
- Client API
lib/freno/client.rb - Decorators
lib/freno/client.rb
Request and results
- Write check
lib/freno/client/requests/check.rb - Read check
lib/freno/client/requests/check_read.rb - Replication delay
lib/freno/client/requests/replication_delay.rb - HTTP request base
lib/freno/client/request.rb - Preconditions
lib/freno/client/preconditions.rb - Response result
lib/freno/client/result.rb - Client errors
lib/freno/client/errors.rb
Throttling
- Throttler
lib/freno/throttler.rb - Store mapper
lib/freno/throttler/mapper.rb - Instrumenter
lib/freno/throttler/instrumenter.rb - Circuit breaker
lib/freno/throttler/circuit_breaker.rb - Throttler errors
lib/freno/throttler/errors.rb
Other components
- Application
- Faraday HTTP client
- Freno service
- Work block
Connections 20
- Application → Client API: calls
README.md - Application → Throttler: invokes
README.md - Client API → Write check: dispatches
lib/freno/client.rb - Client API → Read check: dispatches
lib/freno/client.rb - Client API → Replication delay: dispatches
lib/freno/client.rb - Client API → Decorators: configures
lib/freno/client.rb - Client API → HTTP request base: performs
lib/freno/client.rb - Write check → HTTP request base: inherits
lib/freno/client/requests/check.rb - Replication delay → Write check: inherits
lib/freno/client/requests/replication_delay.rb - HTTP request base → Preconditions: uses
lib/freno/client/request.rb - HTTP request base → Response result: builds
lib/freno/client/request.rb - HTTP request base → Client errors: raises
lib/freno/client/request.rb - HTTP request base → Faraday HTTP client: sends request
lib/freno/client/request.rb - Faraday HTTP client → Freno service: HTTP calls
README.md - Throttler → Store mapper: maps context
lib/freno/throttler.rb - Throttler → Client API: checks stores
lib/freno/throttler.rb - Throttler → Instrumenter: emits events
lib/freno/throttler.rb - Throttler → Circuit breaker: checks circuit
lib/freno/throttler.rb - Throttler → Throttler errors: raises
lib/freno/throttler.rb - Throttler → Work block: yields work
lib/freno/throttler.rb