pub struct CatalogWorker { /* private fields */ }Implementations§
Source§impl CatalogWorker
impl CatalogWorker
pub fn start(catalog: DataCatalog) -> Self
pub fn query_last_timestamp( &self, data_type: NautilusDataType, identifier: Option<String>, ) -> Result<Option<u64>>
pub fn get_missing_intervals( &self, start: UnixNanos, end: UnixNanos, data_type: NautilusDataType, identifier: Option<String>, ) -> Result<Vec<(u64, u64)>>
pub fn get_missing_intervals_for_identifiers( &self, start: UnixNanos, end: UnixNanos, data_type: NautilusDataType, identifiers: Vec<String>, ) -> Result<AHashMap<String, Vec<(u64, u64)>>>
pub fn get_coverage_intervals_for_identifiers( &self, start: UnixNanos, end: UnixNanos, data_type: NautilusDataType, identifiers: Vec<String>, ) -> Result<AHashMap<String, CoverageIntervals>>
pub fn query_batch(&self, query: CatalogQuery) -> Result<DataBatch>
Sourcepub fn query_batch_async(
&self,
query: CatalogQuery,
on_complete: Box<dyn FnOnce(Result<DataBatch>) + Send>,
) -> Result<()>
pub fn query_batch_async( &self, query: CatalogQuery, on_complete: Box<dyn FnOnce(Result<DataBatch>) + Send>, ) -> Result<()>
Enqueues a batch query and invokes on_complete with the result on the
worker thread, without blocking the caller.
pub fn open_session( &self, query: CatalogQuery, chunk_size: Option<usize>, ) -> Result<UUID4>
pub fn pull_session(&self, session_id: UUID4) -> Result<Option<DataBatch>>
Sourcepub fn pull_session_async(
&self,
session_id: UUID4,
on_complete: Box<dyn FnOnce(Result<Option<DataBatch>>) + Send>,
) -> Result<()>
pub fn pull_session_async( &self, session_id: UUID4, on_complete: Box<dyn FnOnce(Result<Option<DataBatch>>) + Send>, ) -> Result<()>
Enqueues one session pull and invokes on_complete on the catalog worker.
Sourcepub fn close_session(&self, session_id: UUID4) -> Result<bool>
pub fn close_session(&self, session_id: UUID4) -> Result<bool>
Closes a session, returning whether it was still open.
pub fn query_instruments( &self, query: CatalogInstrumentQuery, ) -> Result<Vec<InstrumentAny>>
pub fn write(&self, job: CatalogWriteJob) -> Result<()>
pub fn write_async(&self, job: CatalogWriteJob) -> Result<()>
pub fn write_instruments(&self, instruments: Vec<InstrumentAny>) -> Result<()>
pub fn write_instruments_async( &self, instruments: Vec<InstrumentAny>, ) -> Result<()>
pub fn flush(&self) -> Result<()>
Trait Implementations§
Source§impl Debug for CatalogWorker
impl Debug for CatalogWorker
Source§impl Drop for CatalogWorker
impl Drop for CatalogWorker
Auto Trait Implementations§
impl !RefUnwindSafe for CatalogWorker
impl !UnwindSafe for CatalogWorker
impl Freeze for CatalogWorker
impl Send for CatalogWorker
impl Sync for CatalogWorker
impl Unpin for CatalogWorker
impl UnsafeUnpin for CatalogWorker
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> ⓘ
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