pub struct CostTrackerStream<P: Producer> { /* private fields */ }Expand description
Reports through an InventoryTracker, which hashes each ObjectId both to
anonymize it and to decide whether it is sampled. See objectstore_inventory_tracker
for the record format.
Logs, counts, and swallows errors returned by the InventoryTracker.
Implementations§
Source§impl<P: Producer> CostTrackerStream<P>
impl<P: Producer> CostTrackerStream<P>
Sourcepub fn new(producer: P, config: &CostTrackerStreamConfig) -> Self
pub fn new(producer: P, config: &CostTrackerStreamConfig) -> Self
Reports changes through producer, as described by config.
Trait Implementations§
Source§impl<P> ChangeStream for CostTrackerStream<P>
impl<P> ChangeStream for CostTrackerStream<P>
Source§fn write(&self, id: &ObjectId, size: u64, expires_at: Option<SystemTime>)
fn write(&self, id: &ObjectId, size: u64, expires_at: Option<SystemTime>)
Reports that
id now occupies size bytes. Used for new writes and overwrites.Source§fn update(&self, id: &ObjectId, expires_at: Option<SystemTime>)
fn update(&self, id: &ObjectId, expires_at: Option<SystemTime>)
Reports that
id’s expiration moved, with its stored size unchanged.Auto Trait Implementations§
impl<P> Freeze for CostTrackerStream<P>where
P: Freeze,
impl<P> RefUnwindSafe for CostTrackerStream<P>where
P: RefUnwindSafe,
impl<P> Send for CostTrackerStream<P>where
P: Send,
impl<P> Sync for CostTrackerStream<P>where
P: Sync,
impl<P> Unpin for CostTrackerStream<P>where
P: Unpin,
impl<P> UnsafeUnpin for CostTrackerStream<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for CostTrackerStream<P>where
P: UnwindSafe,
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
§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>
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 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>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].