struct Shared {
fields: Entry,
failing: AtomicBool,
timed_out: Mutex<Option<Instant>>,
}Fields§
§fields: EntryThe fields of every entry, encoded once.
failing: AtomicBoolWhether the last send failed, so that a journal which is unavailable gets reported once and not for every chunk of output.
timed_out: Mutex<Option<Instant>>When the lines which last waited for the journal did not go out in
time. The following chunks drop what the journal does not take right
away instead of waiting as well, for at least another
CHUNK_TIMEOUT and after that as long as it takes nothing, like a
stalled one. Waiting for every chunk would slow down the reading of
the output to about one per CHUNK_TIMEOUT, which the other log
drivers and the container, blocked on a full pipe, would wait for.
This way a journal which does not keep up holds it back by about half
at most, and one which stalled not at all.
Implementations§
Sourcefn skip_wait(&self, sent: usize) -> bool
fn skip_wait(&self, sent: usize) -> bool
Whether the lines which the journal did not take right away get
dropped instead of waiting for it, after sent lines went out
without waiting, see Shared::timed_out. Chunks which went out as
a whole ask as well: they end the back-off like a partly taken one,
a journal which recovered would get no bounded wait the next time it
is busy otherwise.
fn socket(&self) -> &Path
Trait Implementations§
Auto Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].