state - OmniCloudOrg/OmniOrchestrator GitHub Wiki

state (src)

Path: src/state.rs

Table of Contents

Public Items

struct SharedState

Definition

pub struct SharedState {
    pub node_id: Arc<str>,
    pub is_leader: bool,
    pub cluster_size: usize,
    pub leader_id: Option<Arc<str>>,
}

fn new

Definition

    pub fn new(node_id: Arc<str>) -> Self {
        Self {
            node_id,
            is_leader: false,
            cluster_size: 1,
            leader_id: None,
        }
    }
}
    // ... function body
}
⚠️ **GitHub.com Fallback** ⚠️