pub struct CommandCoordinator { /* private fields */ }Expand description
Coordinates hierarchical command dissemination
Implementations§
Source§impl CommandCoordinator
impl CommandCoordinator
Sourcepub fn new(
squad_id: Option<String>,
node_id: String,
squad_members: Vec<String>,
storage: Arc<dyn CommandStorage>,
) -> Self
pub fn new( squad_id: Option<String>, node_id: String, squad_members: Vec<String>, storage: Arc<dyn CommandStorage>, ) -> Self
Create new command coordinator with storage backend
Sourcepub async fn issue_command(&self, command: HierarchicalCommand) -> Result<()>
pub async fn issue_command(&self, command: HierarchicalCommand) -> Result<()>
Issue a command (originating from this node)
Sourcepub async fn receive_command(&self, command: HierarchicalCommand) -> Result<()>
pub async fn receive_command(&self, command: HierarchicalCommand) -> Result<()>
Receive a command (from higher echelon)
Sourcepub async fn get_command_status(
&self,
command_id: &str,
) -> Option<CommandStatus>
pub async fn get_command_status( &self, command_id: &str, ) -> Option<CommandStatus>
Get command status
Sourcepub async fn get_command_acknowledgments(
&self,
command_id: &str,
) -> Vec<CommandAcknowledgment>
pub async fn get_command_acknowledgments( &self, command_id: &str, ) -> Vec<CommandAcknowledgment>
Get all acknowledgments for a command
Sourcepub async fn is_command_acknowledged(&self, command_id: &str) -> bool
pub async fn is_command_acknowledged(&self, command_id: &str) -> bool
Check if command has been acknowledged by all targets
Auto Trait Implementations§
impl Freeze for CommandCoordinator
impl !RefUnwindSafe for CommandCoordinator
impl Send for CommandCoordinator
impl Sync for CommandCoordinator
impl Unpin for CommandCoordinator
impl UnsafeUnpin for CommandCoordinator
impl !UnwindSafe for CommandCoordinator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more