Skip to main content

Module state

Module state 

Source
Expand description

Proxy runtime state — shared across the proxy process.

Tracks the health and status of all proxy connections: MCP upstream, tunnel, widgets, cloud sync, and request counters. This is the single source of truth for “what is the proxy doing right now?”

Used by:

  • mcpr start — populates state during operation.
  • mcpr status — could read state via admin API (future).
  • mcpr proxy view — TUI viewer will read this state (future).
  • Health check loop — updates MCP/widget/tunnel status periodically.

Structs§

ProxyState
Runtime state of a running proxy instance.

Enums§

CloudSyncStatus
Cloud sync status from the last flush attempt.
ConnectionStatus
Connection status for an upstream service (MCP, tunnel, widgets).

Functions§

lock_state
Lock the shared state, recovering from poison if a thread panicked.
new_shared_state
Create a new shared proxy state.

Type Aliases§

SharedProxyState
Thread-safe shared proxy state.