pub enum StoreConfig {
Fs {
root: String,
},
S3 {
bucket: String,
endpoint: Option<String>,
region: Option<String>,
},
}Expand description
The selected storage substrate and its parameters.
Variants§
Fs
Filesystem-backed store rooted at root.
S3
S3-compatible store. endpoint/region are None when the ambient AWS
configuration should supply them (real AWS S3); endpoint is set for
MinIO/Garage.
Implementations§
Source§impl StoreConfig
impl StoreConfig
Sourcepub fn from_env(
get: impl Fn(&str) -> Option<String>,
) -> Result<StoreConfig, String>
pub fn from_env( get: impl Fn(&str) -> Option<String>, ) -> Result<StoreConfig, String>
Parse the substrate selection from an environment accessor get.
GONZALO_STORE=fs(default) ors3.fs:GONZALO_ROOT(default./gonzalo-data).s3:GONZALO_S3_BUCKET(required),GONZALO_S3_ENDPOINT,GONZALO_S3_REGION(both optional); credentials come from the standardAWS_*environment as usual.
Returns Err for an unknown GONZALO_STORE or a missing required S3
variable, so the daemon fails fast with a clear message instead of
silently falling back.
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StoreConfig
impl Debug for StoreConfig
Source§impl PartialEq for StoreConfig
impl PartialEq for StoreConfig
impl Eq for StoreConfig
impl StructuralPartialEq for StoreConfig
Auto Trait Implementations§
impl Freeze for StoreConfig
impl RefUnwindSafe for StoreConfig
impl Send for StoreConfig
impl Sync for StoreConfig
impl Unpin for StoreConfig
impl UnsafeUnpin for StoreConfig
impl UnwindSafe for StoreConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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> 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::Request