pub struct S3Staging {
pub client: Client,
pub bucket: String,
pub root_path: String,
pub root_path_slash: String,
pub inode_file: String,
pub config: StagingConfig,
pub runtime_config: HyperFileRuntimeConfig,
pub interceptor: Option<Arc<dyn StagingIntercept<Self>>>,
}Fields§
§client: Client§bucket: String§root_path: String§root_path_slash: String§inode_file: String§config: StagingConfig§runtime_config: HyperFileRuntimeConfig§interceptor: Option<Arc<dyn StagingIntercept<Self>>>Implementations§
Source§impl S3Staging
impl S3Staging
pub fn pesudo( client: &Client, config: StagingConfig, runtime_config: HyperFileRuntimeConfig, ) -> Self
pub async fn from( client: &Client, config: StagingConfig, runtime_config: HyperFileRuntimeConfig, ) -> Result<Self>
pub async fn create( client: &Client, config: StagingConfig, runtime_config: HyperFileRuntimeConfig, ) -> Result<Self>
Trait Implementations§
Source§impl SegmentReadWrite for S3Staging
impl SegmentReadWrite for S3Staging
fn append(&self, segid: SegmentId, buf: &[u8]) -> Result<()>
Source§async fn done(&self, segid: SegmentId, buf: &[u8], len: usize) -> Result<()>
async fn done(&self, segid: SegmentId, buf: &[u8], len: usize) -> Result<()>
Upload a fully-built segment whose contents live in a
single contiguous
&[u8]. Used by the WAL feature path,
which needs the segment buffer pinned in memory across the
upload+replay window.Source§async fn done_pieces(&self, segid: SegmentId, body: SegmentBody) -> Result<()>
async fn done_pieces(&self, segid: SegmentId, body: SegmentBody) -> Result<()>
Upload a fully-built segment whose contents live as a
list of
Bytes pieces. Implementations should stream the
pieces straight to the remote (e.g. via
http_body::Body) rather than concatenating them, which
is the whole point of having this entry point separate
from done.async fn remove(&self, segid: SegmentId) -> Result<()>
async fn open(&self, segid: SegmentId) -> Result<SegmentSum>
async fn list(&self, segid: SegmentId) -> Result<Vec<SegmentId>>
async fn build_block_map( &self, segid: SegmentId, ) -> Result<Vec<(BlockIndex, BlockPtr)>>
Source§impl Staging<S3BlockLoader> for S3Staging
impl Staging<S3BlockLoader> for S3Staging
fn to_block_loader(&self) -> S3BlockLoader
async fn load_inode(&self, buf: &mut [u8]) -> Result<Option<OnDiskState>>
async fn load_inode_from_segment( &self, buf: &mut [u8], segid: SegmentId, ) -> Result<Option<OnDiskState>>
async fn load_segment_timestamp(&self, segid: SegmentId) -> Result<(i64, i64)>
async fn flush_inode( &self, buf: &[u8], inode_state: &Option<OnDiskState>, flag: FlushInodeFlag, ) -> Result<Option<OnDiskState>>
async fn remove_inode(&self, inode_state: &Option<OnDiskState>) -> Result<()>
async fn load_data_block( &self, segid: SegmentId, staging_off: usize, offset: usize, block_size: usize, buf: &mut [u8], ) -> Result<()>
Source§async fn load_range(
&self,
segid: SegmentId,
s3_off: usize,
buf: &mut [u8],
) -> Result<()>
async fn load_range( &self, segid: SegmentId, s3_off: usize, buf: &mut [u8], ) -> Result<()>
Coalesced range read: fetch
buf.len() bytes starting at
byte offset s3_off of the segment file for segid,
writing the bytes directly into buf. Used by the Level-A
read coalescing planner to pack many block-sized fetches
into one ranged S3 GET. The caller has already done all
bmap lookups; this is a thin wrapper around the
staging-layer ranged GET.fn new_segwr( &self, segid: SegmentId, hyper_file_config: &HyperFileMetaConfig, ) -> Writer<S3Staging>
fn dir_filename(&self) -> (&str, &str)
fn root_path(&self) -> &str
fn config(&self) -> &StagingConfig
async fn unlink(&self) -> Result<()>
fn interceptor(&mut self, i: impl StagingIntercept<Self> + 'static)
Auto Trait Implementations§
impl !RefUnwindSafe for S3Staging
impl !UnwindSafe for S3Staging
impl Freeze for S3Staging
impl Send for S3Staging
impl Sync for S3Staging
impl Unpin for S3Staging
impl UnsafeUnpin for S3Staging
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreCreates a shared type from an unshared type.