Skip to content

Commit 1ebd7ac

Browse files
docs: clarify ready endpoint checks for fully hydrated cache
Co-Authored-By: Tejas Badadare <[email protected]>
1 parent 0863181 commit 1ebd7ac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/hermes/server/src/api/rest/ready.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ use {
88
},
99
};
1010

11+
/// Endpoint that returns OK (200) only when the cache is fully hydrated.
12+
///
13+
/// The cache is considered fully hydrated when all of the following conditions are met:
14+
/// - `has_completed_recently`: The latest completed update is recent (within the staleness threshold)
15+
/// - `is_not_behind`: The latest completed slot isn't too far behind the latest observed slot
16+
/// - `is_metadata_loaded`: Price feeds metadata is not empty
17+
///
18+
/// If any of these conditions are not met, the endpoint returns SERVICE_UNAVAILABLE (503)
19+
/// along with detailed metadata about the readiness state.
1120
pub async fn ready<S>(State(state): State<ApiState<S>>) -> Response
1221
where
1322
S: Aggregates,

0 commit comments

Comments
 (0)