pub struct RunningProxy {
pub running_nodes: Vec<RunningNode>,
/* private fields */
}Expand description
A handle that can be used to stop the proxy or change the rules.
Fields§
§running_nodes: Vec<RunningNode>Implementations§
Source§impl RunningProxy
impl RunningProxy
Sourcepub fn turn_off_rules(&mut self)
pub fn turn_off_rules(&mut self)
Disables all the rules in the proxy, effectively making it a pass-through-only proxy.
Sourcepub fn sanity_check(&mut self) -> Result<(), ProxyError>
pub fn sanity_check(&mut self) -> Result<(), ProxyError>
Attempts to fetch the first error that has occurred in proxy since last check. If no errors occurred, returns Ok(()).
Sourcepub async fn wait_for_error(&mut self) -> Option<ProxyError>
pub async fn wait_for_error(&mut self) -> Option<ProxyError>
Waits until an error occurs in proxy. If proxy finishes with no errors occurred, returns Err(()).
Sourcepub async fn finish(self) -> Result<(), ProxyError>
pub async fn finish(self) -> Result<(), ProxyError>
Requests termination of all proxy workers and awaits its completion. Returns the first error that occurred in proxy.
Sourcepub async fn wait_for_connection(&self)
pub async fn wait_for_connection(&self)
Waits until at least one driver connection is active on any node in this proxy.
For single-node proxies (typical in client-routes tests), this waits until a driver has connected to the sole node. For multi-node proxies, returns as soon as any node receives a connection.
Auto Trait Implementations§
impl Freeze for RunningProxy
impl RefUnwindSafe for RunningProxy
impl Send for RunningProxy
impl Sync for RunningProxy
impl Unpin for RunningProxy
impl UnsafeUnpin for RunningProxy
impl UnwindSafe for RunningProxy
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