Struct ibc_relayer::supervisor::SupervisorHandle
source · pub struct SupervisorHandle {
pub sender: Sender<SupervisorCmd>,
/* private fields */
}
Expand description
A wrapper around the SupervisorCmd sender so that we can send stop signal to the supervisor before stopping the chain drivers to prevent the supervisor from raising errors caused by closed connections.
Fields§
§sender: Sender<SupervisorCmd>
Implementations§
source§impl SupervisorHandle
impl SupervisorHandle
sourcepub fn shutdown(self)
pub fn shutdown(self)
Explicitly stop the running supervisor. This is useful in tests where the supervisor has to be stopped and restarted explicitly.
Note that after stopping the supervisor, the only way to restart it
is by respawning a new supervisor using spawn_supervisor
.
pub fn wait(self)
sourcepub fn dump_state(&self) -> Result<SupervisorState, Error>
pub fn dump_state(&self) -> Result<SupervisorState, Error>
Ask the supervisor to dump its internal state
Auto Trait Implementations§
impl !RefUnwindSafe for SupervisorHandle
impl Send for SupervisorHandle
impl Sync for SupervisorHandle
impl Unpin for SupervisorHandle
impl !UnwindSafe for SupervisorHandle
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request