Documentation
¶
Index ¶
- func GetBorderStyles() []string
- func GetBorderTypes() []string
- func GetConfigPath() (string, error)
- func GetRefreshRates() []int
- func GetThemeNames() []string
- func ResolvePath(path string, defaultName string) (string, error)
- func SaveConfig(config AppConfig) error
- func WatchConfig(lastModTime time.Time) tea.Cmd
- type AppConfig
- type ConfigChangeMsg
- type ConfigWatchTickMsg
- type CustomThemeConfig
- type HealthWeights
- type LoggingConfig
- type MetricType
- type RemoteHostConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBorderStyles ¶
func GetBorderStyles() []string
GetBorderStyles returns available border styles
func GetConfigPath ¶
func GetRefreshRates ¶
func GetRefreshRates() []int
GetRefreshRates returns available refresh rates in ms
func ResolvePath ¶ added in v0.1.3
func SaveConfig ¶
Types ¶
type AppConfig ¶
type AppConfig struct {
Thresholds map[MetricType]float64 `json:"thresholds"`
CustomTheme *CustomThemeConfig `json:"custom_theme,omitempty"`
RemoteHosts []RemoteHostConfig `json:"remote_hosts"`
Tabs []string `json:"tabs,omitempty"`
ChartType string `json:"chart_type"`
ViewType string `json:"view_type"` // "normal" or "tree"
SortBy string `json:"sort_by"` // "cpu", "mem", "pid", "name"`
Theme string `json:"theme"` // dark, light, nord, dracula, custom, etc
BorderType string `json:"border_type"` // normal, rounded
BorderStyle string `json:"border_style"` // single, double, dashed
SortDirection string `json:"sort_direction"` // "asc" or "desc"
DefaultTab string `json:"default_tab,omitempty"`
Logging LoggingConfig `json:"logging"`
HealthWeights HealthWeights `json:"health_weights"`
HistoryLength int `json:"history_length"`
RefreshRate int `json:"refresh_rate"` // milliseconds: 500, 1000, 2000, 5000
BackgroundOpaque bool `json:"background_opaque"` // true = opaque, false = transparent
ProcessCpuNormalized bool `json:"process_cpu_normalized"`
}
func DefaultConfig ¶
func DefaultConfig() AppConfig
func LoadConfig ¶
func LoadConfigFromPath ¶ added in v0.6.0
type ConfigChangeMsg ¶
type ConfigWatchTickMsg ¶
type ConfigWatchTickMsg struct{}
type CustomThemeConfig ¶
type CustomThemeConfig struct {
Primary string `json:"primary"`
Secondary string `json:"secondary"`
Success string `json:"success"`
Warning string `json:"warning"`
Alert string `json:"alert"`
Text string `json:"text"`
Muted string `json:"muted"`
Border string `json:"border"`
Background string `json:"background"`
}
func DefaultCustomTheme ¶
func DefaultCustomTheme() *CustomThemeConfig
DefaultCustomTheme returns a default custom theme template
type HealthWeights ¶ added in v0.1.4
type LoggingConfig ¶
type MetricType ¶
type MetricType string
MetricType defines the type of system metric
const ( MetricCPU MetricType = "CPU" MetricMem MetricType = "Memory" MetricDisk MetricType = "Disk" MetricTemp MetricType = "Temperature" )
type RemoteHostConfig ¶
type RemoteHostConfig struct {
Name string `json:"name"`
Host string `json:"host"` // user@hostname or hostname
KeyPath string `json:"key_path,omitempty"` // path to SSH private key
Port int `json:"port,omitempty"` // SSH port (default 22)
Timeout int `json:"timeout,omitempty"` // connection timeout in seconds
}
Click to show internal directories.
Click to hide internal directories.