Skip to main content

FanOut

Struct FanOut 

Source
pub struct FanOut { /* private fields */ }
Expand description

An Observer that forwards every event to several observers in turn.

The engine drives a single observer, so this composes many — e.g. one that updates a status surface and one that records metrics — without the engine knowing how many there are. Mirrors FanOutSink.

Implementations§

Source§

impl FanOut

Source

pub fn new(observers: Vec<Arc<dyn Observer>>) -> Self

Compose the given observers; each receives every event, in order.

Trait Implementations§

Source§

impl Debug for FanOut

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FanOut

Source§

fn default() -> FanOut

Returns the “default value” for a type. Read more
Source§

impl Observer for FanOut

Source§

fn on_indexes_ensured(&self, count: usize)

The target indexes have been ensured at the sink (count of them), before any documents flow.
Source§

fn on_backfill_started(&self, indexes: &[IndexName])

Backfill is starting for indexes (those the sink reported unseeded).
Source§

fn on_index_seeded(&self, index: &IndexName)

index’s backfill is complete and it has been marked seeded.
Source§

fn on_backfill_completed(&self)

The backfill phase finished (all unseeded indexes seeded), or was skipped.
Source§

fn on_live_started(&self)

Live capture has started; the pipeline is now following ongoing changes.
Source§

fn on_change_captured(&self)

One change was pulled from the source into the queue.
Source§

fn on_batch_committed(&self, stats: BatchStats)

A batch was built, flushed, and acked. See BatchStats.
Source§

fn on_slot_lag(&self, bytes: u64)

The source’s capture lag, in bytes behind the latest position — e.g. a replication slot’s distance from the server’s current WAL. Reported by whoever polls ChangeCapture::lag, not by the engine loop itself.
Source§

fn on_document_quarantined(&self, index: &str, id: &str, reason: &str)

A document was quarantined: the sink rejected it at the item level and the engine’s failure policy is to skip and continue (see FailurePolicy::Skip). The document is not applied and the batch proceeds, so it is not redelivered — this is the signal to surface it (a metric, a log, a dead-letter record). index and id are the destination’s names for it; reason is why it was rejected.
Source§

fn on_error(&self, error: &str)

The pipeline stopped on an error (rendered to a string, since the engine’s error type is not part of this neutral surface).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more