pub struct TaskStore { /* private fields */ }Implementations§
Source§impl TaskStore
impl TaskStore
Sourcepub async fn open(path: &Path) -> Result<Self, StoreError>
pub async fn open(path: &Path) -> Result<Self, StoreError>
Open (or create) the per-camp task-runs database at path.
pub async fn insert_run(&self, meta: &TaskRunMeta) -> Result<(), StoreError>
pub async fn update_beholder_status( &self, id: &TaskRunId, status: &BeholderStatus, ) -> Result<(), StoreError>
pub async fn update_status( &self, id: &TaskRunId, status: &RunStatus, ) -> Result<(), StoreError>
Sourcepub async fn append_chunk(
&self,
run_id: &TaskRunId,
offset_ms: u32,
stream: Stream,
bytes: &[u8],
) -> Result<u32, StoreError>
pub async fn append_chunk( &self, run_id: &TaskRunId, offset_ms: u32, stream: Stream, bytes: &[u8], ) -> Result<u32, StoreError>
Append an output chunk. Returns the assigned seq number.
pub async fn get_run( &self, id: &TaskRunId, ) -> Result<Option<TaskRunMeta>, StoreError>
pub async fn chunk_count(&self, run_id: &TaskRunId) -> Result<u32, StoreError>
pub async fn list_runs( &self, filter: &RunFilter, ) -> Result<Vec<TaskRunMeta>, StoreError>
pub async fn archive_run(&self, id: &TaskRunId) -> Result<(), StoreError>
pub async fn pin_run( &self, id: &TaskRunId, pinned: bool, ) -> Result<(), StoreError>
pub async fn gc_sweep(&self, config: &GcConfig) -> Result<GcResult, StoreError>
pub async fn get_chunks( &self, run_id: &TaskRunId, filter: &ChunkFilter, ) -> Result<Vec<OutputChunk>, StoreError>
pub async fn append_event( &self, run_id: &TaskRunId, offset_ms: u32, level: Level, target: &str, msg: &str, fields: &Value, anchor_seq: Option<u32>, source: &EventSource, ) -> Result<u32, StoreError>
pub async fn query_events( &self, run_id: &TaskRunId, filter: &EventFilter, ) -> Result<Vec<Event>, StoreError>
pub async fn event_count( &self, run_id: &TaskRunId, min_level: Option<Level>, ) -> Result<u64, StoreError>
pub async fn query_diagnostics( &self, run_id: &TaskRunId, ) -> Result<Vec<Diagnostic>, StoreError>
pub async fn ensure_field_index( &self, field_path: &str, ) -> Result<(), StoreError>
pub async fn timeline_ticks( &self, run_id: &TaskRunId, since_offset_ms: Option<u32>, limit: Option<usize>, ) -> Result<Vec<TimelineTick>, StoreError>
pub async fn aggregate_events( &self, filter: &AggregateFilter, ) -> Result<Vec<AggregateBucket>, StoreError>
pub async fn upsert_triage(&self, triage: &Triage) -> Result<(), StoreError>
pub async fn get_triage( &self, run_id: &TaskRunId, ) -> Result<Option<Triage>, StoreError>
pub async fn list_field_indexes( &self, ) -> Result<Vec<FieldIndexInfo>, StoreError>
Auto Trait Implementations§
impl !Freeze for TaskStore
impl !RefUnwindSafe for TaskStore
impl !UnwindSafe for TaskStore
impl Send for TaskStore
impl Sync for TaskStore
impl Unpin for TaskStore
impl UnsafeUnpin for TaskStore
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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 more