pub struct CacheConfig {
pub listen: String,
pub backend: BackendConfig,
pub signing_key: Option<PathBuf>,
pub priority: u32,
pub want_mass_query: bool,
pub store_dir: String,
pub require_sigs: bool,
}Expand description
Top-level cache configuration.
Fields§
§listen: StringNetwork address to listen on.
backend: BackendConfigStorage backend configuration.
signing_key: Option<PathBuf>Path to the ed25519 signing secret key file.
In production this path is a cofre/ESO-materialized Kubernetes Secret
mount, never a plaintext literal. When set, the daemon signs every
ingested narinfo (see serve).
priority: u32Cache priority (lower = preferred). Reported in nix-cache-info.
want_mass_query: boolWhether to want mass query (narinfo pipelining).
store_dir: StringThe Nix store directory (almost always /nix/store).
require_sigs: boolWhether this cache’s consumers should require a valid signature.
This is a serving-side advertisement of the fail-closed posture: a
signing cache SHOULD publish require_sigs = true so operators know
the served paths are signed and consumers must verify. It does not by
itself change what the daemon serves (signing is driven by
signing_key); it is the typed knob a consuming config reads to know
the cache is trustworthy fail-closed. Defaults to false to preserve
legacy behavior for caches that have not yet been given a key.
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
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 CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
impl Default for CacheConfig
Source§impl<'de> Deserialize<'de> for CacheConfig
impl<'de> Deserialize<'de> for CacheConfig
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 CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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