Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Addr string
Config *config.Config
ConfigPath string
Supervisor *process.Supervisor
Bus *events.Bus
ToolCache *config.ToolCache
Token string // if set, require token auth for all requests
}
Options configures the web server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP server for the web UI.
func (*Server) ListenAndServe ¶
ListenAndServe starts the HTTP server.
func (*Server) WatchConfig ¶ added in v0.1.24
WatchConfig watches the config file for external changes and updates the in-memory config. Connected SSE clients are notified so the UI can refresh. It watches the parent directory (not the file) to handle atomic renames.
type StatusTracker ¶
type StatusTracker struct {
// contains filtered or unexported fields
}
StatusTracker subscribes to the event bus and maintains last-known ServerStatus per server. This mirrors what the TUI does with its serverStatuses map — without it, status is lost when a handle is removed.
func NewStatusTracker ¶
func NewStatusTracker(bus *events.Bus) *StatusTracker
NewStatusTracker creates a tracker and subscribes it to the bus.
func (*StatusTracker) All ¶
func (st *StatusTracker) All() map[string]events.ServerStatus
All returns a snapshot of all last-known statuses.
func (*StatusTracker) Close ¶
func (st *StatusTracker) Close()
Close unsubscribes from the event bus.
func (*StatusTracker) Get ¶
func (st *StatusTracker) Get(serverID string) (events.ServerStatus, bool)
Get returns the last-known status for a server.