Documentation
¶
Index ¶
- type ConfigConfig
- type ConfigView
- type Dashboard
- type DashboardConfig
- type EnhancedLogsConfig
- type EnhancedLogsView
- type LogEntry
- type LogFilter
- type LogInterceptor
- type LogStats
- type LogsConfig
- type LogsView
- type NodesConfig
- type NodesView
- type TaskFilter
- type TaskManagerConfig
- type TaskManagerView
- func (v *TaskManagerView) GetView() tview.Primitive
- func (v *TaskManagerView) LogDebug(format string, args ...interface{})
- func (v *TaskManagerView) LogError(format string, args ...interface{})
- func (v *TaskManagerView) LogEvent(level string, message string)
- func (v *TaskManagerView) LogInfo(format string, args ...interface{})
- func (v *TaskManagerView) LogSuccess(format string, args ...interface{})
- func (v *TaskManagerView) LogWarn(format string, args ...interface{})
- func (v *TaskManagerView) Refresh(ctx context.Context)
- func (v *TaskManagerView) RefreshAndFocus()
- func (v *TaskManagerView) SetApp(app *tview.Application)
- type TasksConfig
- type TasksView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigConfig ¶
ConfigConfig holds config view configuration
type ConfigView ¶
type ConfigView struct {
// contains filtered or unexported fields
}
ConfigView represents the configuration editor view
func NewConfigView ¶
func NewConfigView(config *ConfigConfig) *ConfigView
NewConfigView creates a new config view
func (*ConfigView) GetView ¶
func (v *ConfigView) GetView() tview.Primitive
GetView returns the config view
func (*ConfigView) Refresh ¶
func (v *ConfigView) Refresh(ctx context.Context)
Refresh refreshes the config data
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard represents the main dashboard view
func NewDashboard ¶
func NewDashboard(config *DashboardConfig) *Dashboard
NewDashboard creates a new dashboard view
type DashboardConfig ¶
type DashboardConfig struct {
Registry *distributed.Registry
Redis *redis.Client
MongoDB *mongo.Database
Logger *slog.Logger
}
DashboardConfig holds dashboard configuration
type EnhancedLogsConfig ¶
EnhancedLogsConfig holds configuration
type EnhancedLogsView ¶
type EnhancedLogsView struct {
// contains filtered or unexported fields
}
EnhancedLogsView represents an enhanced logs viewer using the modular logging system
func NewEnhancedLogsView ¶
func NewEnhancedLogsView(config *EnhancedLogsConfig) *EnhancedLogsView
NewEnhancedLogsView creates an enhanced logs view
func (*EnhancedLogsView) GetView ¶
func (v *EnhancedLogsView) GetView() tview.Primitive
GetView returns the view primitive
func (*EnhancedLogsView) SetApp ¶
func (v *EnhancedLogsView) SetApp(app *tview.Application)
SetApp sets the application reference for redraws
type LogEntry ¶
type LogEntry struct {
Timestamp time.Time `json:"timestamp"`
Level string `json:"level"`
NodeID string `json:"node_id"`
Message string `json:"message"`
Fields map[string]interface{} `json:"fields"`
}
LogEntry represents a log entry
type LogInterceptor ¶
type LogInterceptor struct {
// contains filtered or unexported fields
}
LogInterceptor intercepts fmt.Printf and similar output and redirects to log view
func NewLogInterceptor ¶
func NewLogInterceptor(view *TaskManagerView) *LogInterceptor
NewLogInterceptor creates a new log interceptor
func (*LogInterceptor) Printf ¶
func (l *LogInterceptor) Printf(format string, args ...interface{})
Printf logs a formatted message (replacement for fmt.Printf)
func (*LogInterceptor) Println ¶
func (l *LogInterceptor) Println(args ...interface{})
Println logs a message with newline (replacement for fmt.Println)
func (*LogInterceptor) RedirectOutput ¶
func (l *LogInterceptor) RedirectOutput()
RedirectOutput redirects stdout/stderr to the log interceptor
type LogStats ¶
type LogStats struct {
Total int
Levels map[logging.Level]int
Sources map[string]int
Rate float64
LastUpdate time.Time
}
LogStats tracks log statistics
type LogsConfig ¶
LogsConfig holds logs view configuration
type LogsView ¶
type LogsView struct {
// contains filtered or unexported fields
}
LogsView represents the logs viewer
func NewLogsView ¶
func NewLogsView(config *LogsConfig) *LogsView
NewLogsView creates a new logs view
type NodesConfig ¶
type NodesConfig struct {
Registry *distributed.Registry
Logger *slog.Logger
}
NodesConfig holds nodes view configuration
type NodesView ¶
type NodesView struct {
// contains filtered or unexported fields
}
NodesView represents the nodes management view
func NewNodesView ¶
func NewNodesView(config *NodesConfig) *NodesView
NewNodesView creates a new nodes view
type TaskFilter ¶
TaskFilter holds task filtering options
type TaskManagerConfig ¶
TaskManagerConfig 任务管理配置
type TaskManagerView ¶
type TaskManagerView struct {
// contains filtered or unexported fields
}
TaskManagerView 任务管理视图 - 完整的任务CRUD界面
func NewTaskManagerView ¶
func NewTaskManagerView(config *TaskManagerConfig) *TaskManagerView
NewTaskManagerView 创建任务管理视图
func (*TaskManagerView) LogDebug ¶
func (v *TaskManagerView) LogDebug(format string, args ...interface{})
LogDebug logs a debug message
func (*TaskManagerView) LogError ¶
func (v *TaskManagerView) LogError(format string, args ...interface{})
LogError logs an error message
func (*TaskManagerView) LogEvent ¶
func (v *TaskManagerView) LogEvent(level string, message string)
LogEvent logs an event to the log view (public method for external use)
func (*TaskManagerView) LogInfo ¶
func (v *TaskManagerView) LogInfo(format string, args ...interface{})
LogInfo logs an info message
func (*TaskManagerView) LogSuccess ¶
func (v *TaskManagerView) LogSuccess(format string, args ...interface{})
LogSuccess logs a success message
func (*TaskManagerView) LogWarn ¶
func (v *TaskManagerView) LogWarn(format string, args ...interface{})
LogWarn logs a warning message
func (*TaskManagerView) Refresh ¶
func (v *TaskManagerView) Refresh(ctx context.Context)
Refresh 刷新视图
func (*TaskManagerView) RefreshAndFocus ¶
func (v *TaskManagerView) RefreshAndFocus()
RefreshAndFocus 刷新并设置焦点到任务列表
func (*TaskManagerView) SetApp ¶
func (v *TaskManagerView) SetApp(app *tview.Application)
SetApp 设置应用程序引用
type TasksConfig ¶
TasksConfig holds tasks view configuration
type TasksView ¶
type TasksView struct {
// contains filtered or unexported fields
}
TasksView represents the tasks management view
func NewTasksView ¶
func NewTasksView(config *TasksConfig) *TasksView
NewTasksView creates a new tasks view