pub struct NodeRunner { /* private fields */ }
Expand description
The main node integration coordinator
Implementations§
Source§impl NodeRunner
impl NodeRunner
Sourcepub fn new(config: NodeRunnerConfig) -> Self
pub fn new(config: NodeRunnerConfig) -> Self
Create a new NodeRunner instance
Sourcepub async fn start(&mut self) -> Result<(), NodeRunnerError>
pub async fn start(&mut self) -> Result<(), NodeRunnerError>
Start the node and all its components
Sourcepub async fn run(&mut self) -> Result<(), NodeRunnerError>
pub async fn run(&mut self) -> Result<(), NodeRunnerError>
Main event loop that bridges P2P messages to DAG
Sourcepub async fn stop(&mut self) -> Result<(), NodeRunnerError>
pub async fn stop(&mut self) -> Result<(), NodeRunnerError>
Gracefully stop the node and all its components
Sourcepub fn p2p_handle(&self) -> &Option<P2PHandle>
pub fn p2p_handle(&self) -> &Option<P2PHandle>
Get a reference to the P2P handle
Sourcepub fn dark_resolver(&self) -> &Option<Arc<RwLock<DarkResolver>>>
pub fn dark_resolver(&self) -> &Option<Arc<RwLock<DarkResolver>>>
Get a reference to the dark resolver
Sourcepub fn is_running(&self) -> &Arc<RwLock<bool>>
pub fn is_running(&self) -> &Arc<RwLock<bool>>
Get a reference to the running state
Sourcepub fn config(&self) -> &NodeRunnerConfig
pub fn config(&self) -> &NodeRunnerConfig
Get the node configuration
Sourcepub async fn status(&self) -> Result<Value, NodeRunnerError>
pub async fn status(&self) -> Result<Value, NodeRunnerError>
Get the current node status
Auto Trait Implementations§
impl Freeze for NodeRunner
impl !RefUnwindSafe for NodeRunner
impl Send for NodeRunner
impl Sync for NodeRunner
impl Unpin for NodeRunner
impl !UnwindSafe for NodeRunner
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> 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<'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