pub struct AdminAgent {
pub config: AdminAgentConfig,
pub broadcast_emitter: Sender<NodeMessageTransporter>,
pub broadcast_receiver: Arc<Mutex<Receiver<NodeMessageTransporter>>>,
pub shutdown_send: UnboundedSender<String>,
pub shutdown_recv: Arc<Mutex<UnboundedReceiver<String>>>,
/* private fields */
}Fields§
§config: AdminAgentConfig§broadcast_emitter: Sender<NodeMessageTransporter>§broadcast_receiver: Arc<Mutex<Receiver<NodeMessageTransporter>>>§shutdown_send: UnboundedSender<String>§shutdown_recv: Arc<Mutex<UnboundedReceiver<String>>>Implementations§
Source§impl AdminAgent
impl AdminAgent
pub fn new( config: AdminAgentConfig, on_message: Arc<dyn MessageHandler>, processor: Arc<dyn Processor>, on_event: Arc<dyn EventHandler>, ) -> Self
pub async fn send_direct(&self, to_peer: String, message: Vec<u8>)
pub async fn broadcast(&self, message: Vec<u8>)
pub async fn start(&self, inputs: Vec<u8>, agents: Vec<Arc<WorkerAgent>>)
pub async fn stop(&self)
pub fn details(&self) -> AgentDetail
Auto Trait Implementations§
impl Freeze for AdminAgent
impl !RefUnwindSafe for AdminAgent
impl Send for AdminAgent
impl Sync for AdminAgent
impl Unpin for AdminAgent
impl !UnwindSafe for AdminAgent
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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