Skip to main content

AdminCommands

Struct AdminCommands 

Source
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<'_>

Source

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.

Source

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.

Source

pub async fn exit_maintenance( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>

End a maintenance window for node.

Source

pub async fn cordon(&self, node: NodeId) -> Result<ChainCommit, AdminError>

Mark node ineligible for new placements (existing workload stays).

Source

pub async fn uncordon(&self, node: NodeId) -> Result<ChainCommit, AdminError>

Remove a prior cordon.

Source

pub async fn drop_replicas( &self, node: NodeId, chains: Vec<ChainId>, ) -> Result<ChainCommit, AdminError>

Drop the listed replicas from node.

Source

pub async fn invalidate_placement( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>

Force a placement recompute for node.

Source

pub async fn restart_all_daemons( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>

Force-restart every daemon on node.

Source

pub async fn clear_avoid_list( &self, node: NodeId, ) -> Result<ChainCommit, AdminError>

Clear node’s local avoid list.

Auto Trait Implementations§

§

impl<'a> Freeze for AdminCommands<'a>

§

impl<'a> RefUnwindSafe for AdminCommands<'a>

§

impl<'a> Send for AdminCommands<'a>

§

impl<'a> Sync for AdminCommands<'a>

§

impl<'a> Unpin for AdminCommands<'a>

§

impl<'a> UnsafeUnpin for AdminCommands<'a>

§

impl<'a> UnwindSafe for AdminCommands<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more