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.
The s3 backend requires the opt-in blob-s3 Cargo feature.
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.
Fields
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§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 Forget for BlobConfig
impl Freeze for BlobConfig
impl Move for BlobConfig
impl RefUnwindSafe for BlobConfig
impl Send for BlobConfigwhere
RawVecInner: Send,
impl Sync for BlobConfigwhere
RawVecInner: Sync,
impl Unpin for BlobConfig
impl UnsafeUnpin for BlobConfig
impl UnwindSafe for BlobConfigwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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