pub struct ControlPlaneState {
pub nodes: BTreeMap<NodeId, ClusterNode>,
pub placements: BTreeMap<RaftGroupId, DataGroupPlacement>,
pub migrations: BTreeMap<u64, GroupMigration>,
pub active_migration: Option<u64>,
pub next_migration_id: u64,
pub config: MetaConfig,
}Fields§
§nodes: BTreeMap<NodeId, ClusterNode>§placements: BTreeMap<RaftGroupId, DataGroupPlacement>§migrations: BTreeMap<u64, GroupMigration>§active_migration: Option<u64>§next_migration_id: u64§config: MetaConfigImplementations§
Source§impl ControlPlaneState
impl ControlPlaneState
pub fn new(config: MetaConfig) -> Self
pub fn apply(&mut self, command: ControlCommand) -> ControlResponse
pub fn active_migration(&self) -> Option<&GroupMigration>
pub fn placement_view( &self, raft_group_id: RaftGroupId, ) -> Option<GroupPlacementView>
Trait Implementations§
Source§impl Clone for ControlPlaneState
impl Clone for ControlPlaneState
Source§fn clone(&self) -> ControlPlaneState
fn clone(&self) -> ControlPlaneState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlPlaneState
impl Debug for ControlPlaneState
Source§impl Default for ControlPlaneState
impl Default for ControlPlaneState
Source§impl<'de> Deserialize<'de> for ControlPlaneState
impl<'de> Deserialize<'de> for ControlPlaneState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ControlPlaneState
Source§impl PartialEq for ControlPlaneState
impl PartialEq for ControlPlaneState
Source§impl Serialize for ControlPlaneState
impl Serialize for ControlPlaneState
impl StructuralPartialEq for ControlPlaneState
Auto Trait Implementations§
impl Freeze for ControlPlaneState
impl RefUnwindSafe for ControlPlaneState
impl Send for ControlPlaneState
impl Sync for ControlPlaneState
impl Unpin for ControlPlaneState
impl UnsafeUnpin for ControlPlaneState
impl UnwindSafe for ControlPlaneState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more