pub struct RuntimeState {Show 21 fields
pub snapshot: Arc<ArcSwap<CompiledRuntimeSnapshot>>,
pub routing: Arc<SharedRoutingService>,
pub metrics: Arc<dyn SessionMetrics>,
pub runtime_metrics: Arc<dyn RuntimeMetrics>,
pub readiness: Arc<AtomicBool>,
pub start_time: Instant,
pub active_connections: Arc<AtomicU64>,
pub connection_counter: Arc<AtomicU64>,
pub admin_local_addr: Arc<Mutex<Option<SocketAddr>>>,
pub listener_addrs: Arc<Mutex<Vec<Option<SocketAddr>>>>,
pub health: Arc<Mutex<Option<HealthManager>>>,
pub health_cancel: CancellationToken,
pub health_runtime: Mutex<Option<Handle>>,
pub udp_registry: Arc<UdpAssociationRegistry>,
pub udp_metrics: Arc<UdpMetrics>,
pub shadowsocks_metrics: Arc<ShadowsocksMetrics>,
pub udp_tasks: TaskTracker,
pub transparent_accepted_total: Arc<AtomicU64>,
pub transparent_original_dst_failed_total: Arc<AtomicU64>,
pub reverse_registry: Arc<ReverseRegistry>,
pub reverse_metrics: Arc<ReverseMetrics>,
/* private fields */
}Fields§
§snapshot: Arc<ArcSwap<CompiledRuntimeSnapshot>>§routing: Arc<SharedRoutingService>§metrics: Arc<dyn SessionMetrics>§runtime_metrics: Arc<dyn RuntimeMetrics>§readiness: Arc<AtomicBool>§start_time: Instant§active_connections: Arc<AtomicU64>§connection_counter: Arc<AtomicU64>§admin_local_addr: Arc<Mutex<Option<SocketAddr>>>§listener_addrs: Arc<Mutex<Vec<Option<SocketAddr>>>>§health: Arc<Mutex<Option<HealthManager>>>§health_cancel: CancellationToken§health_runtime: Mutex<Option<Handle>>§udp_registry: Arc<UdpAssociationRegistry>§udp_metrics: Arc<UdpMetrics>§shadowsocks_metrics: Arc<ShadowsocksMetrics>§udp_tasks: TaskTracker§transparent_accepted_total: Arc<AtomicU64>§transparent_original_dst_failed_total: Arc<AtomicU64>§reverse_registry: Arc<ReverseRegistry>§reverse_metrics: Arc<ReverseMetrics>Implementations§
Source§impl RuntimeState
impl RuntimeState
pub fn generation(&self) -> u64
Sourcepub fn apply_compiled_config(&self, new_config: &RuntimeConfig) -> ReloadResult
pub fn apply_compiled_config(&self, new_config: &RuntimeConfig) -> ReloadResult
Canonical reload transaction shared by file-backed supervisor reload, SIGHUP handling, and embed string/file reload entry points.
Applies a newly compiled eggress_config::compile::RuntimeConfig to
the running state with all side effects centralized:
classification, snapshot compilation, snapshot publication, routing
swap, admin publication, health restart, H2 pool invalidation, and
metrics recording. Failure preserves the prior generation.
Callers differ only in how new_config is obtained (file load vs.
string parse). Supervisors with stored rt_config must update that
bookkeeping on Applied; the snapshot itself remains authoritative
for the next classification.
Sourcepub fn restart_health_probes(&self)
pub fn restart_health_probes(&self)
Restart health probes for the upstreams in the current snapshot.
Auto Trait Implementations§
impl !Freeze for RuntimeState
impl !RefUnwindSafe for RuntimeState
impl !UnwindSafe for RuntimeState
impl Send for RuntimeState
impl Sync for RuntimeState
impl Unpin for RuntimeState
impl UnsafeUnpin for RuntimeState
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