pub struct TaskInfoCache { /* private fields */ }Expand description
Bounded map of task id to TaskMeta.
Implementations§
Source§impl TaskInfoCache
impl TaskInfoCache
Sourcepub fn on_submit(&self, id: u64, meta: TaskMeta)
pub fn on_submit(&self, id: u64, meta: TaskMeta)
Record a submission (not for duplicates: the original details stay).
Sourcepub fn on_event(&self, ev: &StatusEvent, pool: &Arc<str>, at_ns: i64)
pub fn on_event(&self, ev: &StatusEvent, pool: &Arc<str>, at_ns: i64)
Record a status event of a task in pool, observed at at_ns (Unix ns).
Sourcepub fn list_finished(
&self,
pools: &[&str],
statuses: &[TaskStatus],
after: u64,
limit: usize,
) -> Vec<(u64, TaskMeta)>
pub fn list_finished( &self, pools: &[&str], statuses: &[TaskStatus], after: u64, limit: usize, ) -> Vec<(u64, TaskMeta)>
Finished tasks in id order: those in one of pools (any if empty) with one of
statuses (any finished status if empty) and ids above after, at most limit.
Sourcepub fn id_for_key(&self, key: &str) -> Option<u64>
pub fn id_for_key(&self, key: &str) -> Option<u64>
Latest task id seen for key.
Auto Trait Implementations§
impl !Freeze for TaskInfoCache
impl RefUnwindSafe for TaskInfoCache
impl Send for TaskInfoCache
impl Sync for TaskInfoCache
impl Unpin for TaskInfoCache
impl UnsafeUnpin for TaskInfoCache
impl UnwindSafe for TaskInfoCache
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> 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 moreSource§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