pub struct AdminCommands<'a> { /* private fields */ }Expand description
Typed admin-command surface. Constructed via
DeckClient::admin; every method maps to one
super::meshos::AdminEvent variant.
Phase 1 publishes events onto the loop’s event stream directly (matching the substrate’s current admin-event entry path). When the substrate adds a signed admin chain, this surface gains a signing step before the publish — the per-method type signatures don’t change.
Implementations§
Source§impl AdminCommands<'_>
impl AdminCommands<'_>
Sourcepub async fn drain(
&self,
node: NodeId,
drain_for: Duration,
) -> Result<ChainCommit, AdminError>
pub async fn drain( &self, node: NodeId, drain_for: Duration, ) -> Result<ChainCommit, AdminError>
Drain node’s workload over drain_for. Replicas
migrate; daemons drain via
crate::adapter::net::compute::DaemonControl::DrainStart
once the loop sees the resulting EnteringMaintenance
state. The duration is the wait-window from the loop’s
next tick; the substrate computes the absolute deadline
at fold time so two replays of the same event stream
produce identical since / deadline instants.
Sourcepub async fn enter_maintenance(
&self,
node: NodeId,
drain_for: Option<Duration>,
) -> Result<ChainCommit, AdminError>
pub async fn enter_maintenance( &self, node: NodeId, drain_for: Option<Duration>, ) -> Result<ChainCommit, AdminError>
Begin a maintenance window for node. drain_for is
the drain-window duration; None defers to the cluster’s
configured default. The substrate-side fold computes the
absolute deadline as last_tick + drain_for.
Sourcepub async fn exit_maintenance(
&self,
node: NodeId,
) -> Result<ChainCommit, AdminError>
pub async fn exit_maintenance( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>
End a maintenance window for node.
Sourcepub async fn cordon(&self, node: NodeId) -> Result<ChainCommit, AdminError>
pub async fn cordon(&self, node: NodeId) -> Result<ChainCommit, AdminError>
Mark node ineligible for new placements (existing
workload stays).
Sourcepub async fn uncordon(&self, node: NodeId) -> Result<ChainCommit, AdminError>
pub async fn uncordon(&self, node: NodeId) -> Result<ChainCommit, AdminError>
Remove a prior cordon.
Sourcepub async fn drop_replicas(
&self,
node: NodeId,
chains: Vec<ChainId>,
) -> Result<ChainCommit, AdminError>
pub async fn drop_replicas( &self, node: NodeId, chains: Vec<ChainId>, ) -> Result<ChainCommit, AdminError>
Drop the listed replicas from node.
Sourcepub async fn invalidate_placement(
&self,
node: NodeId,
) -> Result<ChainCommit, AdminError>
pub async fn invalidate_placement( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>
Force a placement recompute for node.
Sourcepub async fn restart_all_daemons(
&self,
node: NodeId,
) -> Result<ChainCommit, AdminError>
pub async fn restart_all_daemons( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>
Force-restart every daemon on node.
Sourcepub async fn clear_avoid_list(
&self,
node: NodeId,
) -> Result<ChainCommit, AdminError>
pub async fn clear_avoid_list( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>
Clear node’s local avoid list.