pub struct WaitForConfig {
pub http: Option<String>,
pub tcp: Option<String>,
pub expect_status: Option<u16>,
pub timeout_secs: u64,
pub interval_ms: u64,
}Expand description
Step-level config for StepKind::WaitFor (R513-F3, W207 Gap #5). Names a
single network endpoint to poll and the time budget for it to come up.
[[steps]]
name = "wait:ready"
kind = "wait-for"
[steps.wait_for]
http = "http://localhost:3000/health" # plaintext HTTP GET, healthy on 2xx/3xx
timeout_secs = 30 # give up (and fail the step) after this
# interval_ms = 500 # poll cadence (default 500ms)
# expect_status = 200 # require an exact status instead of any 2xx/3xxExactly one of Self::http / Self::tcp must be set. The http probe
is a dependency-free plaintext HTTP/1.1 GET (no TLS in v1 — an https://
URL is rejected at runtime; use a tcp gate or terminate TLS in front);
the tcp probe is a bare connect to host:port, healthy the moment the
port accepts. Self::expect_status is HTTP-only.
Fields§
§http: Option<String>Plaintext-HTTP URL to GET each poll (e.g. http://localhost:3000/health).
Healthy on a 2xx/3xx response, or on an exact match to
Self::expect_status when set. Mutually exclusive with Self::tcp.
tcp: Option<String>host:port to connect to each poll (e.g. 127.0.0.1:5432). Healthy the
moment the connect succeeds — no bytes are exchanged. Mutually exclusive
with Self::http.
expect_status: Option<u16>Require this exact HTTP status to consider the endpoint healthy, instead
of the default “any 2xx/3xx”. HTTP-only — validate() rejects it
alongside a tcp target. None ⇒ any 2xx/3xx.
timeout_secs: u64Total budget, in seconds, for the endpoint to become healthy. The step fails with a clear “never became healthy” message once this elapses. Defaults to 30s.
interval_ms: u64Delay between poll attempts, in milliseconds. Defaults to 500ms — snappy enough for a fast-booting dev server without hammering the socket.
Implementations§
Source§impl WaitForConfig
impl WaitForConfig
Sourcepub fn http_is_tls(&self) -> bool
pub fn http_is_tls(&self) -> bool
true when an https:// URL was given — TLS health-gates are out of
scope for v1 (no HTTP client / TLS stack pulled into qed). The runner
surfaces this as a clean StepFailed rather than silently trying a
plaintext GET against a TLS port.
Trait Implementations§
Source§impl Clone for WaitForConfig
impl Clone for WaitForConfig
Source§fn clone(&self) -> WaitForConfig
fn clone(&self) -> WaitForConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WaitForConfig
impl Debug for WaitForConfig
Source§impl<'de> Deserialize<'de> for WaitForConfig
impl<'de> Deserialize<'de> for WaitForConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WaitForConfig
Source§impl PartialEq for WaitForConfig
impl PartialEq for WaitForConfig
Source§impl Serialize for WaitForConfig
impl Serialize for WaitForConfig
impl StructuralPartialEq for WaitForConfig
Auto Trait Implementations§
impl Freeze for WaitForConfig
impl RefUnwindSafe for WaitForConfig
impl Send for WaitForConfig
impl Sync for WaitForConfig
impl Unpin for WaitForConfig
impl UnsafeUnpin for WaitForConfig
impl UnwindSafe for WaitForConfig
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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