Expand description
Response validation and the per-service circuit breaker.
Two containment controls live here:
validate_responsechecks a worker’s response against the declared contract: exactly one column of the expected type, and a row count equal to the input. The byte-size ceiling is enforced upstream as a bounded, streaming check incrate::remote::transportso an oversized response is rejected before it is fully buffered — not here after the fact.CircuitBreakerfails fast when a worker is unhealthy. It trips on the error rate over a rolling window, is held per service (all functions on a sick worker fail fast together), and admits a single probe in the half-open state.
Structs§
- Circuit
Breaker - Per-service circuit breaker: rolling-window error-rate trip, single-probe half-open. Cheaply cloneable; clones share one state machine.
- Circuit
Breaker Config - Circuit-breaker tuning.
- Circuit
Breaker Open Error - Error returned when a call is rejected because the breaker is open.
Enums§
- Validation
Error - Validation failures, each a distinct, named error.
Functions§
- validate_
response - Validate a worker response’s schema and row count against the contract.