pub struct BlobCollector {
handle: JoinHandle<()>,
stop: Arc<Notify>,
}Expand description
A running collector, stopped by BlobCollector::stop or by dropping it.
Fields§
§handle: JoinHandle<()>§stop: Arc<Notify>Implementations§
Source§impl BlobCollector
impl BlobCollector
Sourcepub fn spawn(registry: Arc<dyn BlobCollect>, interval: Duration) -> Self
pub fn spawn(registry: Arc<dyn BlobCollect>, interval: Duration) -> Self
Starts collecting through registry every interval.
The first tick fires immediately, so a restart takes what the previous run left past its grace without waiting an interval. That pass runs alongside serving, like every later one.
Each pass runs on a blocking thread, as crate::stale_sweep’s does:
it takes the write lock every write path takes and unlinks files.
Trait Implementations§
Source§impl Drop for BlobCollector
impl Drop for BlobCollector
Auto Trait Implementations§
impl Freeze for BlobCollector
impl RefUnwindSafe for BlobCollector
impl Send for BlobCollector
impl Sync for BlobCollector
impl Unpin for BlobCollector
impl UnsafeUnpin for BlobCollector
impl UnwindSafe for BlobCollector
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
Mutably borrows from an owned value. Read more
§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