refactor: extract runtime state backends

This commit is contained in:
fawney19
2026-05-08 00:18:12 +08:00
parent 6f620d92be
commit 6247ac3edc
111 changed files with 4358 additions and 3203 deletions

View File

@@ -689,10 +689,10 @@ pub(crate) async fn proxy_request(
)));
}
Err(RequestAdmissionError::Distributed(
aether_runtime::DistributedConcurrencyError::Saturated { gate, limit },
aether_runtime_state::RuntimeSemaphoreError::Saturated { gate, limit },
))
| Err(RequestAdmissionError::Distributed(
aether_runtime::DistributedConcurrencyError::Unavailable { gate, limit, .. },
aether_runtime_state::RuntimeSemaphoreError::Unavailable { gate, limit, .. },
)) => {
let trace_id = extract_or_generate_trace_id(request.headers());
let response = build_local_overloaded_response(&trace_id, None, gate, limit)?;
@@ -714,7 +714,7 @@ pub(crate) async fn proxy_request(
));
}
Err(RequestAdmissionError::Distributed(
aether_runtime::DistributedConcurrencyError::InvalidConfiguration(message),
aether_runtime_state::RuntimeSemaphoreError::InvalidConfiguration(message),
)) => return Err(GatewayError::Internal(message)),
};
let request_admission_ms = started_at.elapsed().as_millis() as u64;