Documentation
¶
Index ¶
- Constants
- func Run(sources DataSources) error
- func RunMinimal(sources MinimalDataSources) (*tea.Program, <-chan error)
- type AppModel
- type DataSources
- type DataSourcesReadyMsg
- type EntitiesUpdateMsg
- type ErrorMsg
- type KeyMap
- type LogEntryMsg
- type MetricsUpdateMsg
- type MinimalDataSources
- type QuitMsg
- type RefreshMsg
- type StreamsUpdateMsg
- type TickMsg
- type WindowSizeMsg
- type WorkersUpdateMsg
Constants ¶
const ( PanelSystem = iota PanelWorkers PanelLogs PanelEntities PanelCount )
Panel indices
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(sources DataSources) error
Run starts the TUI application with full data sources (blocking)
func RunMinimal ¶
func RunMinimal(sources MinimalDataSources) (*tea.Program, <-chan error)
RunMinimal starts the TUI with minimal data sources and returns the program for sending DataSourcesReadyMsg later. The returned channel signals when TUI exits.
Types ¶
type AppModel ¶
type AppModel struct {
// contains filtered or unexported fields
}
AppModel is the root TUI model
func NewApp ¶
func NewApp(sources DataSources) *AppModel
NewApp creates a new TUI application with full data sources
func NewAppMinimal ¶
func NewAppMinimal(sources MinimalDataSources) *AppModel
NewAppMinimal creates a TUI application with only log support (for early startup)
type DataSources ¶
type DataSources struct {
WorkerManager *workers.Manager
JetStream nats.JetStreamContext
KeyValue nats.KeyValue
LogHook *logger.TUIHook
}
DataSources holds all data source dependencies
type DataSourcesReadyMsg ¶
type DataSourcesReadyMsg struct {
WorkerManager interface{} // *workers.Manager - use interface to avoid import cycle
JetStream interface{} // nats.JetStreamContext
KeyValue interface{} // nats.KeyValue
}
DataSourcesReadyMsg signals that data sources are now available
type EntitiesUpdateMsg ¶
type EntitiesUpdateMsg struct {
Entities []datasource.EntitySummary
}
EntitiesUpdateMsg contains updated entity data
type ErrorMsg ¶
type ErrorMsg struct {
Error error
}
ErrorMsg represents an error that occurred during data fetching
type KeyMap ¶
type KeyMap struct {
// Navigation
Up key.Binding
Down key.Binding
Left key.Binding
Right key.Binding
NextTab key.Binding
PrevTab key.Binding
PageUp key.Binding
PageDown key.Binding
Home key.Binding
End key.Binding
// Actions
Toggle key.Binding
Refresh key.Binding
Help key.Binding
Quit key.Binding
}
KeyMap defines all keybindings for the TUI
type LogEntryMsg ¶
type LogEntryMsg struct {
Time time.Time
Level string
Message string
Fields map[string]interface{}
}
LogEntryMsg contains a new log entry
type MetricsUpdateMsg ¶
type MetricsUpdateMsg = datasource.MetricsSnapshot
MetricsUpdateMsg contains updated system metrics
type MinimalDataSources ¶
MinimalDataSources holds only the log hook for early TUI startup
type StreamsUpdateMsg ¶
type StreamsUpdateMsg struct {
Streams []datasource.StreamStat
}
StreamsUpdateMsg contains updated NATS stream stats
type WindowSizeMsg ¶
WindowSizeMsg is sent when the terminal window is resized
type WorkersUpdateMsg ¶
type WorkersUpdateMsg struct {
Workers []datasource.WorkerStatus
}
WorkersUpdateMsg contains updated worker statuses