pub struct IntervalPipe { /* private fields */ }Expand description
Periodic producer Pipe. Fires every period, dispatches a Request
built by request_factory to inner.
The pipe is content-agnostic: the request factory decides whether
the body is empty Bytes, Bytes::from_static(b"..."),
a Carry typed payload, or stream — anything the spine can hold. The
method-byte and path are configurable per the discriminant
convention; default to TICK / /tick so a bare IntervalPipe
works as a heartbeat source without any extra config.
Implementations§
Source§impl IntervalPipe
impl IntervalPipe
Sourcepub fn new(
period: Duration,
inner: PipeHandle,
request_factory: RequestFactory,
name: impl Into<String>,
) -> Self
pub fn new( period: Duration, inner: PipeHandle, request_factory: RequestFactory, name: impl Into<String>, ) -> Self
Construct directly. Most callers should use Self::builder.
Sourcepub fn builder() -> IntervalPipeBuilder
pub fn builder() -> IntervalPipeBuilder
Fluent builder entry point (workspace principle 4).
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The source’s label, set via IntervalPipeBuilder::name (default
"interval"). Used as the ProducerLifecycle::spawn_from_source
task name by convention; carries no other runtime behaviour.
Sourcepub fn empty_request_factory() -> RequestFactory
pub fn empty_request_factory() -> RequestFactory
Build the default RequestFactory — emits a Request with
method DEFAULT_TICK_METHOD, path DEFAULT_TICK_PATH, no
headers, and an empty Bytes body. Useful when the inner Pipe only
cares about the timing edge, not the payload.
Trait Implementations§
Source§impl SendPipe for IntervalPipe
impl SendPipe for IntervalPipe
Source§type Err = ProximaError
type Err = ProximaError
Send here so it can cross cores.