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<()>
async fn done(&self, segid: SegmentId, buf: &[u8], len: usize) -> Result<()>
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<()>
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 Freeze for S3Staging
impl !RefUnwindSafe for S3Staging
impl Send for S3Staging
impl Sync for S3Staging
impl Unpin for S3Staging
impl !UnwindSafe 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
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.