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§
- Proxy
State - Runtime state of a running proxy instance.
Enums§
- Cloud
Sync Status - Cloud sync status from the last flush attempt.
- Connection
Status - 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§
- Shared
Proxy State - Thread-safe shared proxy state.