pub struct EdgeConfig {
pub enabled: bool,
pub role: EdgeRole,
pub home_url: String,
pub auth_token: String,
pub allow_insecure_home_url: bool,
pub default_ttl_secs: u64,
pub max_entries: usize,
pub max_edges: usize,
pub liveness_window_secs: u64,
pub subscribe_gc_secs: u64,
pub region: String,
pub edge_id: String,
}Expand description
Edge-mode runtime config ([edge] in proxy.toml). Every field is
serde-defaulted so a partial — or absent — section parses on any
build; the machinery only runs when enabled and the
edge-proxy feature is compiled in (validate() rejects the
former without the latter).
Fields§
§enabled: boolMaster switch. Off (default) = the edge cache/registry wiring is skipped entirely and this section is inert.
role: EdgeRole“edge” or “home” mode. Edges forward writes + cache reads; home is authoritative.
home_url: StringFor edge: home proxy admin URL (e.g. “https://proxy.home.svc:9090”). Empty when role = home.
auth_token: StringFor edge: bearer token presented to home’s admin API for the
invalidation subscription. Empty when role = home. When set,
home_url must be https:// (or allow_insecure_home_url
opted into) — the token is the home’s ADMIN bearer and must
not cross an untrusted network in cleartext.
allow_insecure_home_url: boolFor edge: allow presenting auth_token to a plain-http
home_url. Only for provably private links (VPN/WireGuard/
service mesh, loopback dev setups) — mirrors
admin_allow_insecure on the home side.
default_ttl_secs: u64Default TTL in seconds applied to cache entries when the home
doesn’t supply one explicitly. Reads expire after this elapses.
(Integer seconds, like every other *_secs duration knob.)
max_entries: usizeMaximum cache entries before LRU eviction kicks in.
max_edges: usizeFor home: maximum simultaneous registered edge nodes.
liveness_window_secs: u64For home: edges not seen within this window are pruned from the registry by the GC sweep (a pruned edge just re-registers on its next reconnect). Liveness is refreshed by successful SSE heartbeat writes (every 15s), so keep this comfortably above ~45s (3 heartbeats) or healthy-but-idle edges will churn.
subscribe_gc_secs: u64For home: cadence of the registry GC sweep.
region: StringFor edge: region label reported when subscribing to the home
(shows up in the home’s /api/edge listing).
edge_id: StringFor edge: stable id this proxy registers under. Empty
(default) = the runtime falls back to “edge-
Implementations§
Source§impl EdgeConfig
impl EdgeConfig
Sourcepub fn default_ttl(&self) -> Duration
pub fn default_ttl(&self) -> Duration
The entry TTL as a Duration (config carries integer seconds,
matching every other *_secs knob).
Trait Implementations§
Source§impl Clone for EdgeConfig
impl Clone for EdgeConfig
Source§fn clone(&self) -> EdgeConfig
fn clone(&self) -> EdgeConfig
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 EdgeConfig
impl Debug for EdgeConfig
Source§impl Default for EdgeConfig
impl Default for EdgeConfig
Source§impl<'de> Deserialize<'de> for EdgeConfig
impl<'de> Deserialize<'de> for EdgeConfig
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>,
Source§impl PartialEq for EdgeConfig
impl PartialEq for EdgeConfig
Source§impl Serialize for EdgeConfig
impl Serialize for EdgeConfig
impl StructuralPartialEq for EdgeConfig
Auto Trait Implementations§
impl Freeze for EdgeConfig
impl RefUnwindSafe for EdgeConfig
impl Send for EdgeConfig
impl Sync for EdgeConfig
impl Unpin for EdgeConfig
impl UnsafeUnpin for EdgeConfig
impl UnwindSafe for EdgeConfig
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