Struct DumpTrigger
pub struct DumpTrigger { /* private fields */ }dial9 and pipeline only.Expand description
Sending half of the trigger channel.
Cloneable; reach it from any thread owned by the runtime via
Dial9Handle::dump_trigger
and hand it to whatever subsystem decides when to dump (an idle-ratio
watcher, a panic hook, a /dump HTTP handler, …). Every clone shares the
debounce gate configured by DumpTriggerConfig::debounce.
Implementations§
§impl DumpTrigger
impl DumpTrigger
pub fn with_debounce(self, window: Duration) -> DumpTrigger
pub fn with_debounce(self, window: Duration) -> DumpTrigger
Coalesce duplicate triggers within window into a single dump.
Applied once at build time from DumpTriggerConfig::debounce; every
dump_trigger clone
then shares one gate. The first trigger in a quiet period dispatches
normally; any trigger arriving within window of that dispatch resolves
DumpError::Coalesced (naming the dump it folded into) without
starting a new dump. Useful when a single source - a watcher that
re-trips every poll, a hot path that dumps per slow request - would
otherwise fire a burst of near-identical dumps.
pub fn dump_current_data(&self) -> DumpRun<'_>
pub fn dump_current_data(&self) -> DumpRun<'_>
Capture everything the ring still holds, right now. No forward window.
pub fn dump_time_range(
&self,
lookback: Duration,
lookforward: Duration,
) -> DumpRun<'_>
pub fn dump_time_range( &self, lookback: Duration, lookforward: Duration, ) -> DumpRun<'_>
Capture the window [trigger - lookback, trigger + lookforward].
Either side may be Duration::ZERO.
lookback captures pre-trigger segments; you can look back only as
far as the ring still retains, so a lookback wider than the
retained history is best-effort and captures what survived.
lookforward keeps the dump open until trigger + lookforward,
attaching segments as they seal; it is bounded only by the process
lifetime and is best-effort under upload pressure. The actual
covered span is reported on DumpReceipt::time_range. This never
errors and never resizes or pins the ring.
Trait Implementations§
§impl Clone for DumpTrigger
impl Clone for DumpTrigger
§fn clone(&self) -> DumpTrigger
fn clone(&self) -> DumpTrigger
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DumpTrigger
impl RefUnwindSafe for DumpTrigger
impl Send for DumpTrigger
impl Sync for DumpTrigger
impl Unpin for DumpTrigger
impl UnsafeUnpin for DumpTrigger
impl UnwindSafe for DumpTrigger
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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> ⓘ
§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§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 rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more