pub struct CloudflaredRunner { /* private fields */ }Expand description
Manages the lifecycle of a cloudflared tunnel run child process.
When dropped, the child process is terminated.
Implementations§
Source§impl CloudflaredRunner
impl CloudflaredRunner
Sourcepub fn spawn(config_yml_path: &Path, tunnel_id: &str) -> Result<Self>
pub fn spawn(config_yml_path: &Path, tunnel_id: &str) -> Result<Self>
Spawn cloudflared tunnel --config <config_yml_path> run <tunnel_id>.
Returns an error if cloudflared is not found on PATH.
Sourcepub fn wait_for_ready(&mut self, timeout: Duration) -> Result<()>
pub fn wait_for_ready(&mut self, timeout: Duration) -> Result<()>
Block until cloudflared reports it has established a tunnel connection,
or until timeout elapses. Returns an error with diagnostic stderr lines
if the timeout expires before a ready marker is seen.
Trait Implementations§
Source§impl Drop for CloudflaredRunner
impl Drop for CloudflaredRunner
Auto Trait Implementations§
impl Freeze for CloudflaredRunner
impl RefUnwindSafe for CloudflaredRunner
impl Send for CloudflaredRunner
impl Sync for CloudflaredRunner
impl Unpin for CloudflaredRunner
impl UnsafeUnpin for CloudflaredRunner
impl UnwindSafe for CloudflaredRunner
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