pub struct DataLakeConnection {
pub db_pool: Pool<Postgres>,
pub blob_storage: Arc<BlobStorage>,
/* private fields */
}Expand description
A connection to the data lake, including a database pool and a blob storage client.
Fields§
§db_pool: Pool<Postgres>§blob_storage: Arc<BlobStorage>Implementations§
Source§impl DataLakeConnection
impl DataLakeConnection
pub fn new( db_pool: Pool<Postgres>, blob_storage: Arc<BlobStorage>, ) -> DataLakeConnection
Sourcepub fn new_with_prefetch(
db_pool: Pool<Postgres>,
blob_storage: Arc<BlobStorage>,
prefetch: Option<Arc<dyn ObjectPrefetch>>,
) -> DataLakeConnection
pub fn new_with_prefetch( db_pool: Pool<Postgres>, blob_storage: Arc<BlobStorage>, prefetch: Option<Arc<dyn ObjectPrefetch>>, ) -> DataLakeConnection
Like new, but also wires the object cache’s prefetch face for
write-time warming (see warm_object).
Sourcepub fn warm_object(&self, key: &str, size: i64) -> Option<JoinHandle<()>>
pub fn warm_object(&self, key: &str, size: i64) -> Option<JoinHandle<()>>
Warm a freshly-written object in the object cache by key. Fire-and-forget
at prefetch priority: spawns a detached task and returns immediately, so the
caller’s write path is never delayed or failed by a warm. No-op when the
cache is not configured or size <= 0. Returns the spawned task handle (or
None) purely so tests can await completion deterministically; production
callers ignore it.
This is a general “warm any object” primitive — the write-partition path is
its first caller, but nothing here is partition-specific (e.g. the ingestion
service could warm raw payloads the same way). key is the lake-root-relative
object key; the configured prefetch handle applies the lake root prefix so the
warmed key matches the key demand reads produce.
Trait Implementations§
Source§impl Clone for DataLakeConnection
impl Clone for DataLakeConnection
Source§fn clone(&self) -> DataLakeConnection
fn clone(&self) -> DataLakeConnection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DataLakeConnection
impl !RefUnwindSafe for DataLakeConnection
impl Send for DataLakeConnection
impl Sync for DataLakeConnection
impl Unpin for DataLakeConnection
impl UnsafeUnpin for DataLakeConnection
impl !UnwindSafe for DataLakeConnection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
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>
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>
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>,
Layered].