Function forest_filecoin::health::endpoints::livez
source ยท pub(crate) async fn livez(
__arg0: State<Arc<ForestState>>,
__arg1: Query<HashMap<String, String>>,
) -> Result<String, AppError>
Expand description
Liveness probes determine whether or not an application running in a container is in a healthy state. The idea behind a liveness probe is that it fails for prolonged period of time, then the application should be restarted. In our case, we require:
- The node is not in an error state (i.e., boot-looping)
- At least 1 peer is connected (without peers, the node is isolated and cannot sync)
If any of these conditions are not met, the node is not healthy. If this happens for a prolonged period of time, the application should be restarted.