state - OmniCloudOrg/OmniOrchestrator GitHub Wiki
Path: src/state.rs
pub struct SharedState {
pub node_id: Arc<str>,
pub is_leader: bool,
pub cluster_size: usize,
pub leader_id: Option<Arc<str>>,
}
pub fn new(node_id: Arc<str>) -> Self {
Self {
node_id,
is_leader: false,
cluster_size: 1,
leader_id: None,
}
}
}
// ... function body
}