pub struct WriteSinks<'a> {
pub indexer_tx: &'a Sender<IndexEvent>,
pub events: Option<&'a dyn EventPublisher>,
pub index_health: Option<&'a IndexHealth>,
pub source: EventSource,
}Expand description
The two places a durable write is reported to, and on whose behalf.
Fields§
§indexer_tx: &'a Sender<IndexEvent>The in-process indexing queue (D38).
events: Option<&'a dyn EventPublisher>The event log, when NOTEDTHAT_EVENTS_BACKEND selects one.
index_health: Option<&'a IndexHealth>Where what happened at the queue — enqueued, refused, or a queue with
no worker behind it — is recorded for the health view (#97). None
only in tests that have no health view to keep.
source: EventSourceThe surface making the write, stamped on every event it publishes.
Implementations§
Source§impl<'a> WriteSinks<'a>
impl<'a> WriteSinks<'a>
Sourcepub fn new(
indexer_tx: &'a Sender<IndexEvent>,
events: Option<&'a dyn EventPublisher>,
index_health: &'a IndexHealth,
source: EventSource,
) -> Self
pub fn new( indexer_tx: &'a Sender<IndexEvent>, events: Option<&'a dyn EventPublisher>, index_health: &'a IndexHealth, source: EventSource, ) -> Self
Both sinks, recording on index_health.
Sourcepub fn indexer_only(indexer_tx: &'a Sender<IndexEvent>) -> Self
pub fn indexer_only(indexer_tx: &'a Sender<IndexEvent>) -> Self
The indexing queue alone, as every deployment without an events backend runs, attributed to the HTTP API, with nothing keeping a health record.
Trait Implementations§
Source§impl<'a> Clone for WriteSinks<'a>
impl<'a> Clone for WriteSinks<'a>
impl<'a> Copy for WriteSinks<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WriteSinks<'a>
impl<'a> !UnwindSafe for WriteSinks<'a>
impl<'a> Freeze for WriteSinks<'a>
impl<'a> Send for WriteSinks<'a>
impl<'a> Sync for WriteSinks<'a>
impl<'a> Unpin for WriteSinks<'a>
impl<'a> UnsafeUnpin for WriteSinks<'a>
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
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> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request