laminar_core/cluster/control/leader_lease/
artifact_admission.rs1use super::{
2 CheckpointArtifactInventory, ClusterCheckpointAuthorityError, LeaderLeaseStore, LeaderProof,
3};
4
5impl LeaderLeaseStore {
6 pub async fn cluster_checkpoint_artifacts(
11 &self,
12 ) -> Result<Option<CheckpointArtifactInventory>, ClusterCheckpointAuthorityError> {
13 Ok(self
14 .cluster_checkpoint_artifact_admission()
15 .await?
16 .map(|(inventory, _)| inventory))
17 }
18
19 pub async fn cluster_checkpoint_artifact_admission(
27 &self,
28 ) -> Result<Option<(CheckpointArtifactInventory, LeaderProof)>, ClusterCheckpointAuthorityError>
29 {
30 Ok(self.load_record().await?.and_then(|head| {
31 head.active_checkpoint_artifacts
32 .zip(head.active_checkpoint_artifact_leader_proof)
33 }))
34 }
35}