How x-mesh/edc works
edc is a terminal toolkit for SE/SRE diagnosis and host operations. The principal workflow is: an operator invokes a command, the CLI loads validated configuration, dispatches a probe or operation, gathers local or remote evidence, and renders a consistent terminal or JSON result. Distinct stages include command orchestration, network diagnosis, host observation, remote execution, and guarded changes. Sampled files show orchestration and several probe implementations; some documented commands are represented from the repository tree without asserting unsampled call details.
Components 29
CLI orchestration
- Command dispatcher
internal/edc/app.go - Interactive screens
internal/edc/tui.go
Network diagnosis
- Doctor workflow
internal/edc/app.go - Probe suite
internal/edc/probes.go - Network probes
internal/edc/system.go - Route analysis
internal/edc/route.go - Region measurement
internal/edc/where.go
Host observation
- Host information
internal/edc/info.go - Resource sampler
internal/edc/resource.go - Resource dashboard
internal/edc/tui_top.go - Socket inspection
internal/edc/system.go - Packet capture
internal/edc/capture.go
Remote operations
- Remote runner
internal/edc/remote.go - Guarded changes
internal/edc/change.go - Self updater
internal/edc/update.go
Configuration and results
- Config loader
internal/edc/config.go - Setup wizard
internal/edc/setup.go - Result renderer
internal/edc/output.go - Report tools
internal/edc/report.go - Config file
internal/edc/config.go - Report files
internal/edc/report.go
Other components
- SRE operator
- Host operating system
- Network targets
- Cloud region endpoints
- ipinfo service
- Managed hosts
- Release service
- Installed binary
Connections 33
- SRE operator → Command dispatcher: invokes
- Command dispatcher → Config loader: loads defaults
- Setup wizard → Config file: writes atomically
- Config loader → Config file: reads
- Command dispatcher → Doctor workflow: dispatches
- Doctor workflow → Probe suite: runs probes
- Probe suite → Network probes: executes checks
- Network probes → Network targets: probes targets
- Doctor workflow → Route analysis: runs route
- Route analysis → Host operating system: reads routes
- Region measurement → Cloud region endpoints: measures latency
- Region measurement → ipinfo service: gets location
- Command dispatcher → Host information: dispatches
- Host information → Host operating system: reads host data
- Command dispatcher → Resource dashboard: dispatches
- Resource dashboard → Resource sampler: samples
- Resource sampler → Host operating system: reads resources
- Command dispatcher → Socket inspection: dispatches
- Socket inspection → Host operating system: inspects sockets
- Command dispatcher → Packet capture: dispatches
- Packet capture → Host operating system: captures traffic
- Command dispatcher → Remote runner: dispatches
- Remote runner → Managed hosts: runs steps
- Command dispatcher → Guarded changes: dispatches
- Guarded changes → Host operating system: applies guarded change
- Command dispatcher → Self updater: dispatches
- Self updater → Release service: downloads release
- Self updater → Installed binary: replaces binary
- Command dispatcher → Result renderer: renders results
- Result renderer → Report files: writes reports
- Report tools → Report files: reads reports
- Command dispatcher → Report tools: dispatches
- Command dispatcher → Interactive screens: starts screens