#[non_exhaustive]pub enum OriginKind {
Http,
Filesystem,
S3,
Peer,
}Expand description
Tag identifying which origin backend a cache engine is configured
against (#439). Surfaced through the admin eviction-preview so
dry-run callers can estimate origin egress cost — re-fetching from a
Filesystem origin is a local read; Http and S3 may consume
metered bandwidth.
The serde representation uses lowercase tag names (http,
filesystem, s3) so admin RPC JSON output is operator-friendly
and stable for log scrapers. (OriginKind itself is output-only —
it is never deserialised from operator TOML; the [cache.origin]
table uses OriginConfig.)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Http
Pull-through over HTTP/HTTPS.
Filesystem
Pull-through from a local filesystem directory.
S3
Pull-through from an S3-compatible object store.
Peer
Paid pull-through from another deCDN node over cdn/client/v1
(node-to-node cache-miss fill, #831). Unlike the other kinds this
egress is billed in USDC per MB (an upstream provider charges this
node), so an eviction-preview caller should treat a re-fetch from a
Peer origin as the most expensive option. This variant is
node-internal — it is never parsed from operator TOML (the
[cache.origin] table only accepts http/filesystem/s3); it
only ever appears in admin/eviction output to tag the network origin.
Implementations§
Trait Implementations§
Source§impl Clone for OriginKind
impl Clone for OriginKind
Source§fn clone(&self) -> OriginKind
fn clone(&self) -> OriginKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OriginKind
Source§impl Debug for OriginKind
impl Debug for OriginKind
Source§impl<'de> Deserialize<'de> for OriginKind
impl<'de> Deserialize<'de> for OriginKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OriginKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OriginKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for OriginKind
impl Display for OriginKind
impl Eq for OriginKind
Source§impl Hash for OriginKind
impl Hash for OriginKind
Source§impl PartialEq for OriginKind
impl PartialEq for OriginKind
Source§impl Serialize for OriginKind
impl Serialize for OriginKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for OriginKind
Auto Trait Implementations§
impl Freeze for OriginKind
impl RefUnwindSafe for OriginKind
impl Send for OriginKind
impl Sync for OriginKind
impl Unpin for OriginKind
impl UnsafeUnpin for OriginKind
impl UnwindSafe for OriginKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> RpcMessage for T
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.