Enum goodmetrics::pipeline::TimeSource
source · pub enum TimeSource {
SystemTime,
DynamicTime {
now_wall_clock: Box<dyn Fn() -> SystemTime + Send + Sync>,
now_timer: Box<dyn Fn() -> Instant + Send + Sync>,
sleep: Box<dyn Fn(Duration) + Send + Sync>,
},
}
Expand description
Primarily for testing and getting really deep into some stuff, here’s a way to customize how you group aggregates over time.
Variants§
Trait Implementations§
source§impl Debug for TimeSource
impl Debug for TimeSource
Auto Trait Implementations§
impl Freeze for TimeSource
impl !RefUnwindSafe for TimeSource
impl Send for TimeSource
impl Sync for TimeSource
impl Unpin for TimeSource
impl !UnwindSafe for TimeSource
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
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> 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