
runtime
Package runtime is the daemon composition root. It assembles every long-lived subsystem - observability, DI, the HTTP listener, background workers, the reload coordinator - and owns the shutdown order so the CLI entry point does not.
Index
type Observability
Observability bundles the state produced by daemon-startup logging and tracing initialization. The in-memory LogBuffer is exposed so the UI log pane can subscribe to it; ShutdownTracer is called during ordered teardown.
type Options
Options carries the inputs the CLI Run passes through to runtime.
type Runtime
Runtime is the composed daemon. Construct with New, then call Run to block until ctx is cancelled. Shutdown ordering is owned here.
func New
New assembles the runtime. Order matters: config -> observability -> DI -> required services -> HTTP -> reload coordinator -> lifecycle manager. Each step’s failure returns immediately so the caller can surface a precise startup error.
func (*Runtime) Run
Run starts background services, the SIGHUP watcher, and the HTTP listener; blocks until ctx is cancelled or the HTTP listener errors; then performs ordered shutdown. The returned error is the listener’s error if it surfaced one before ctx was cancelled, otherwise nil.
Generated by gomarkdoc