pub struct TestECStoreEnvBuilder { /* private fields */ }Expand description
Builder for TestECStoreEnv. Defaults reproduce the historical heal
bootstrap: 4 disks, one pool, one set, bucket-metadata system initialized.
Implementations§
Source§impl TestECStoreEnvBuilder
impl TestECStoreEnvBuilder
Sourcepub fn disk_count(self, n: usize) -> Self
pub fn disk_count(self, n: usize) -> Self
Number of disk directories in the single erasure set (default 4).
Sourcepub fn prefix(self, prefix: &str) -> Self
pub fn prefix(self, prefix: &str) -> Self
Temp-dir name prefix, e.g. rustfs_heal_b5_test (a uuid suffix is
always appended). Ignored when base_dir is set.
Sourcepub fn base_dir(self, dir: impl Into<PathBuf>) -> Self
pub fn base_dir(self, dir: impl Into<PathBuf>) -> Self
Use a caller-owned directory (e.g. a tempfile::TempDir path) instead
of creating /tmp/<prefix>_<uuid>. The caller keeps cleanup ownership.
Sourcepub fn init_bucket_metadata(self, yes: bool) -> Self
pub fn init_bucket_metadata(self, yes: bool) -> Self
Whether to run init_bucket_metadata_sys after the store comes up
(default true, as the heal bootstraps did).
Sourcepub async fn build(self) -> TestECStoreEnv
pub async fn build(self) -> TestECStoreEnv
Build the environment. Panics on any bootstrap failure — this is test scaffolding, and a broken environment must fail the test loudly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestECStoreEnvBuilder
impl RefUnwindSafe for TestECStoreEnvBuilder
impl Send for TestECStoreEnvBuilder
impl Sync for TestECStoreEnvBuilder
impl Unpin for TestECStoreEnvBuilder
impl UnsafeUnpin for TestECStoreEnvBuilder
impl UnwindSafe for TestECStoreEnvBuilder
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.