pub enum BlobConfig {
Fs {
root: Option<String>,
floor_bytes: Option<u64>,
},
S3 {
bucket: String,
region: String,
endpoint: Option<String>,
prefix: Option<String>,
allow_http: Option<bool>,
},
}Expand description
[storage.blob] section: a closed backend = "fs" | "s3" selector.
Internally tagged on backend with deny_unknown_fields: an unknown
top-level key, a field that belongs to the other backend variant (e.g.
bucket under backend = "fs"), or an S3 credential field (never
accepted in TOML – ADR-111 Amendment 2 reads credentials from the
process environment only) are all rejected at config-load time by the
same mechanism, since each variant only declares its own fields.
[storage.blob]
backend = "fs"
root = "/var/lib/khive/blobs"
floor_bytes = 100000000000[storage.blob]
backend = "s3"
bucket = "khive-blobs"
region = "us-east-1"
endpoint = "https://objects.example.invalid"
prefix = "blobs"Variants§
Fs
Filesystem-backed blob storage (FsBlobStore). Root resolution is
unchanged from khive#292: KHIVE_BLOB_ROOT env var, then this
root, then <db_dir>/blobs.
S3
S3-compatible blob storage (S3BlobStore). KHIVE_BLOB_ROOT has no
effect for this backend. Credentials always come from
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN in the
process environment, never from this section.
Trait Implementations§
Source§impl Clone for BlobConfig
impl Clone for BlobConfig
Source§fn clone(&self) -> BlobConfig
fn clone(&self) -> BlobConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlobConfig
impl Debug for BlobConfig
Source§impl<'de> Deserialize<'de> for BlobConfig
impl<'de> Deserialize<'de> for BlobConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BlobConfig
impl RefUnwindSafe for BlobConfig
impl Send for BlobConfig
impl Sync for BlobConfig
impl Unpin for BlobConfig
impl UnsafeUnpin for BlobConfig
impl UnwindSafe for BlobConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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