pub struct Federation {
pub upstreams: Vec<String>,
pub timeout: Duration,
pub max_bytes: u64,
pub cache_bytes: u64,
/* private fields */
}Expand description
Asking other registries, and what that may cost this one.
A vocabulary this registry does not hold is asked for upstream, in
the order the upstreams were named, checked as kute fetch checks
one (parsed, valid, the digest recomputed, test vectors run), and
kept in memory to be given again. Every bound is here: one question
upstream at a time, however many callers ask; a deadline and a size
limit on each; a cache of fixed size; and a short memory of digests
nobody had, so that asking for them again costs nothing.
Fields§
§upstreams: Vec<String>§timeout: DurationLongest wait for one upstream.
max_bytes: u64Largest file taken from an upstream.
cache_bytes: u64Most bytes of upstream files kept. The oldest go first.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Federation
impl !RefUnwindSafe for Federation
impl !UnwindSafe for Federation
impl Forget for Federation
impl Move for Federation
impl Send for Federation
impl Sync for Federation
impl Unpin for Federation
impl UnsafeUnpin for Federation
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> 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 more