Documentation
¶
Index ¶
- Variables
- func Run() error
- type ActionResultMsg
- type CommandModel
- type CommandResult
- type ConfirmAction
- type ConfirmModel
- type ConfirmRequestMsg
- type ConfirmYesMsg
- type DescribeModel
- type DoctorKeyMap
- type DoctorResultMsg
- type DoctorRunningMsg
- type DoctorViewModel
- type GraphKeyMap
- type GraphModel
- type HeaderModel
- type HelpModel
- type InputMode
- type LogErrMsg
- type LogLineMsg
- type LogsKeyMap
- type LogsModel
- type Model
- type ServiceInfo
- type ServiceStats
- type ServiceUpdateMsg
- type ServicesKeyMap
- type ServicesModel
- func (m ServicesModel) Count() int
- func (m ServicesModel) ErrorZoom() bool
- func (m ServicesModel) Init() tea.Cmd
- func (m ServicesModel) Selected() string
- func (m ServicesModel) Services() []ServiceInfo
- func (m ServicesModel) SetFilter(f string) ServicesModel
- func (m ServicesModel) ToggleErrorZoom() ServicesModel
- func (m ServicesModel) Update(msg tea.Msg) (ServicesModel, tea.Cmd)
- func (m ServicesModel) View(width, height int) string
- type StatsHistory
- type StatsUpdateMsg
- type TickMsg
- type ToastExpiredMsg
- type ToastModel
- type ToastMsg
- type ViewType
Constants ¶
This section is empty.
Variables ¶
View Source
var DoctorKeys = DoctorKeyMap{ Back: key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "back")), Expand: key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "details")), Rescan: key.NewBinding(key.WithKeys("R"), key.WithHelp("R", "re-scan")), }
View Source
var GraphKeys = GraphKeyMap{ Back: key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "back")), Select: key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "select")), }
View Source
var LogsKeys = LogsKeyMap{ Back: key.NewBinding(key.WithKeys("esc"), key.WithHelp("esc", "back")), Timestamps: key.NewBinding(key.WithKeys("t"), key.WithHelp("t", "timestamps")), Wrap: key.NewBinding(key.WithKeys("w"), key.WithHelp("w", "wrap")), Search: key.NewBinding(key.WithKeys("/"), key.WithHelp("/", "search")), Clear: key.NewBinding(key.WithKeys("c"), key.WithHelp("c", "clear")), Top: key.NewBinding(key.WithKeys("g"), key.WithHelp("g", "top")), Bottom: key.NewBinding(key.WithKeys("G"), key.WithHelp("G", "bottom")), }
View Source
var ServicesKeys = ServicesKeyMap{ Up: key.NewBinding(key.WithKeys("up", "k"), key.WithHelp("↑/k", "up")), Down: key.NewBinding(key.WithKeys("down", "j"), key.WithHelp("↓/j", "down")), Restart: key.NewBinding(key.WithKeys("r"), key.WithHelp("r", "restart")), Shell: key.NewBinding(key.WithKeys("s"), key.WithHelp("s", "shell")), Logs: key.NewBinding(key.WithKeys("l"), key.WithHelp("l", "logs")), Delete: key.NewBinding(key.WithKeys("x"), key.WithHelp("x", "stop")), Desc: key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "describe")), Doctor: key.NewBinding(key.WithKeys("d"), key.WithHelp("d", "doctor")), Graph: key.NewBinding(key.WithKeys("g"), key.WithHelp("g", "graph")), Filter: key.NewBinding(key.WithKeys("/"), key.WithHelp("/", "filter")), Command: key.NewBinding(key.WithKeys(":"), key.WithHelp(":", "command")), Help: key.NewBinding(key.WithKeys("?"), key.WithHelp("?", "help")), Quit: key.NewBinding(key.WithKeys("q"), key.WithHelp("q", "quit")), }
Functions ¶
Types ¶
type ActionResultMsg ¶
type CommandModel ¶
type CommandModel struct {
// contains filtered or unexported fields
}
func NewCommandModel ¶
func NewCommandModel() CommandModel
func (*CommandModel) Activate ¶
func (m *CommandModel) Activate(mode InputMode)
func (CommandModel) Active ¶
func (m CommandModel) Active() bool
func (CommandModel) Filter ¶
func (m CommandModel) Filter() string
func (*CommandModel) SetServiceNames ¶
func (m *CommandModel) SetServiceNames(names []string)
func (CommandModel) Update ¶
func (m CommandModel) Update(msg tea.Msg) (CommandModel, tea.Cmd)
func (CommandModel) View ¶
func (m CommandModel) View(width int) string
type CommandResult ¶
type ConfirmAction ¶
type ConfirmAction int
const ( ConfirmRestart ConfirmAction = iota ConfirmDelete )
type ConfirmModel ¶
type ConfirmModel struct {
// contains filtered or unexported fields
}
func NewConfirmModel ¶
func NewConfirmModel() ConfirmModel
func (ConfirmModel) Request ¶
func (m ConfirmModel) Request(action ConfirmAction, service string) ConfirmModel
func (ConfirmModel) Update ¶
func (m ConfirmModel) Update(msg tea.Msg) (ConfirmModel, tea.Cmd)
func (ConfirmModel) View ¶
func (m ConfirmModel) View() string
type ConfirmRequestMsg ¶
type ConfirmRequestMsg struct {
Action ConfirmAction
Service string
}
type ConfirmYesMsg ¶
type ConfirmYesMsg struct {
Action ConfirmAction
Service string
}
type DescribeModel ¶
type DescribeModel struct {
// contains filtered or unexported fields
}
func NewDescribeModel ¶
func NewDescribeModel() DescribeModel
func (DescribeModel) ServiceName ¶
func (m DescribeModel) ServiceName() string
func (DescribeModel) Start ¶
func (m DescribeModel) Start(service string, services []ServiceInfo, width, height int) (DescribeModel, tea.Cmd)
func (DescribeModel) Update ¶
func (m DescribeModel) Update(msg tea.Msg) (DescribeModel, tea.Cmd)
func (DescribeModel) View ¶
func (m DescribeModel) View(width, height int) string
type DoctorKeyMap ¶
type DoctorResultMsg ¶
type DoctorRunningMsg ¶
type DoctorRunningMsg struct{}
type DoctorViewModel ¶
type DoctorViewModel struct {
// contains filtered or unexported fields
}
func NewDoctorViewModel ¶
func NewDoctorViewModel() DoctorViewModel
func (DoctorViewModel) Init ¶
func (m DoctorViewModel) Init() tea.Cmd
func (DoctorViewModel) Update ¶
func (m DoctorViewModel) Update(msg tea.Msg) (DoctorViewModel, tea.Cmd)
func (DoctorViewModel) View ¶
func (m DoctorViewModel) View(width, height int) string
type GraphModel ¶
type GraphModel struct {
// contains filtered or unexported fields
}
func NewGraphModel ¶
func NewGraphModel() GraphModel
func (GraphModel) Init ¶
func (m GraphModel) Init() tea.Cmd
func (GraphModel) Update ¶
func (m GraphModel) Update(msg tea.Msg) (GraphModel, tea.Cmd)
func (GraphModel) View ¶
func (m GraphModel) View(width, height int) string
type HeaderModel ¶
type HeaderModel struct {
// contains filtered or unexported fields
}
func NewHeaderModel ¶
func NewHeaderModel() HeaderModel
func (HeaderModel) Init ¶
func (m HeaderModel) Init() tea.Cmd
func (HeaderModel) Update ¶
func (m HeaderModel) Update(msg tea.Msg) (HeaderModel, tea.Cmd)
type LogLineMsg ¶
type LogLineMsg struct {
Line string
}
type LogsKeyMap ¶
type LogsModel ¶
type LogsModel struct {
// contains filtered or unexported fields
}
func NewLogsModel ¶
func NewLogsModel() LogsModel
func (LogsModel) ServiceName ¶
type ServiceInfo ¶
type ServiceStats ¶
type ServiceUpdateMsg ¶
type ServiceUpdateMsg struct {
Services []ServiceInfo
Err error
}
type ServicesKeyMap ¶
type ServicesModel ¶
type ServicesModel struct {
// contains filtered or unexported fields
}
func NewServicesModel ¶
func NewServicesModel() ServicesModel
func (ServicesModel) Count ¶
func (m ServicesModel) Count() int
func (ServicesModel) ErrorZoom ¶
func (m ServicesModel) ErrorZoom() bool
func (ServicesModel) Init ¶
func (m ServicesModel) Init() tea.Cmd
func (ServicesModel) Selected ¶
func (m ServicesModel) Selected() string
func (ServicesModel) Services ¶
func (m ServicesModel) Services() []ServiceInfo
func (ServicesModel) SetFilter ¶
func (m ServicesModel) SetFilter(f string) ServicesModel
func (ServicesModel) ToggleErrorZoom ¶
func (m ServicesModel) ToggleErrorZoom() ServicesModel
func (ServicesModel) Update ¶
func (m ServicesModel) Update(msg tea.Msg) (ServicesModel, tea.Cmd)
func (ServicesModel) View ¶
func (m ServicesModel) View(width, height int) string
type StatsHistory ¶
type StatsHistory struct {
// contains filtered or unexported fields
}
func (*StatsHistory) Push ¶
func (h *StatsHistory) Push(cpu, mem float64)
type StatsUpdateMsg ¶
type StatsUpdateMsg struct {
Stats map[string]ServiceStats
}
type ToastExpiredMsg ¶
type ToastExpiredMsg struct{}
type ToastModel ¶
type ToastModel struct {
// contains filtered or unexported fields
}
func NewToastModel ¶
func NewToastModel() ToastModel
func (ToastModel) Hide ¶
func (m ToastModel) Hide() ToastModel
func (ToastModel) Message ¶
func (m ToastModel) Message() string
func (ToastModel) Show ¶
func (m ToastModel) Show(text string) ToastModel
func (ToastModel) Tick ¶
func (m ToastModel) Tick() tea.Cmd
Click to show internal directories.
Click to hide internal directories.