pub struct S3Cleaner { /* private fields */ }Expand description
S3-backed cleaner for a single hyperfile rooted at a given
s3://<bucket>/<prefix> URI.
The cleaner does not retain or open the file’s data. It only
reads the published inode and walks the metadata B+tree to
enumerate referenced segments, then deletes the unreferenced
ones via DeleteObjects.
Concurrency: the cleaner is not aware of in-flight writers. If
a writer publishes a new checkpoint while collect /
prune is running, the result reflects whatever inode was
loaded at the start of the call. New segments published after
that point are outside the configured [low, high] range and
are not affected.
Implementations§
Source§impl S3Cleaner
impl S3Cleaner
Sourcepub async fn new(root_uri: &str) -> Result<Self>
pub async fn new(root_uri: &str) -> Result<Self>
Construct a cleaner for root_uri, using the AWS SDK’s
default credential / region resolution
(aws_config::load_from_env).
Returns InvalidInput if root_uri is not a valid S3 URI.
Sourcepub async fn with_client(client: &Client, root_uri: &str) -> Result<Self>
pub async fn with_client(client: &Client, root_uri: &str) -> Result<Self>
Construct a cleaner using a caller-supplied Client. Use
this when you need to control region / endpoint / credential
resolution explicitly (for example, in tests or in a tool
that already has a configured client).
Returns InvalidInput if root_uri is not a valid S3 URI.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for S3Cleaner
impl !UnwindSafe for S3Cleaner
impl Freeze for S3Cleaner
impl Send for S3Cleaner
impl Sync for S3Cleaner
impl Unpin for S3Cleaner
impl UnsafeUnpin for S3Cleaner
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> 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>
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