Documentation
¶
Index ¶
- func CopyToClipboard(text string) error
- type ActionMenu
- func (m *ActionMenu) Hide()
- func (m ActionMenu) Init() tea.Cmd
- func (m ActionMenu) IsVisible() bool
- func (m ActionMenu) Matches(msg tea.KeyMsg, binding key.Binding) bool
- func (m *ActionMenu) SetSize(width, height int)
- func (m *ActionMenu) Show(title string, items []MenuItem)
- func (m ActionMenu) Update(msg tea.Msg) (ActionMenu, tea.Cmd)
- func (m ActionMenu) View() string
- type ActionMenuResult
- type Breadcrumb
- type ConfirmDialog
- type ConfirmResult
- type EventsPanel
- func (e EventsPanel) EventCount() int
- func (e EventsPanel) Init() tea.Cmd
- func (e EventsPanel) SelectedEvent() *k8s.EventInfo
- func (e *EventsPanel) SetEvents(events []k8s.EventInfo)
- func (e *EventsPanel) SetSize(width, height int)
- func (e EventsPanel) Update(msg tea.Msg) (EventsPanel, tea.Cmd)
- func (e EventsPanel) View() string
- func (e EventsPanel) WarningCount() int
- type HelpEntry
- type HelpPanel
- type LogsPanel
- func (l LogsPanel) ErrorCount() int
- func (l LogsPanel) Filter() string
- func (l LogsPanel) Init() tea.Cmd
- func (l LogsPanel) IsFollowing() bool
- func (l LogsPanel) IsSearching() bool
- func (l LogsPanel) LogCount() int
- func (l LogsPanel) SelectedContainer() string
- func (l *LogsPanel) SetContainers(containers []string)
- func (l *LogsPanel) SetFilter(filter string)
- func (l *LogsPanel) SetLogs(logs []k8s.LogLine)
- func (l *LogsPanel) SetSize(width, height int)
- func (l LogsPanel) ShowPrevious() bool
- func (l *LogsPanel) ToggleFollow()
- func (l LogsPanel) Update(msg tea.Msg) (LogsPanel, tea.Cmd)
- func (l LogsPanel) View() string
- type ManifestPanel
- func (m ManifestPanel) Init() tea.Cmd
- func (m *ManifestPanel) SetHelpers(helpers []k8s.DebugHelper)
- func (m *ManifestPanel) SetPod(pod *k8s.PodInfo)
- func (m *ManifestPanel) SetRelated(related *k8s.RelatedResources)
- func (m *ManifestPanel) SetSize(width, height int)
- func (m ManifestPanel) Update(msg tea.Msg) (ManifestPanel, tea.Cmd)
- func (m ManifestPanel) View() string
- type ManifestViewMode
- type MenuItem
- type MetricsPanel
- func (m MetricsPanel) Init() tea.Cmd
- func (m MetricsPanel) IsAvailable() bool
- func (m *MetricsPanel) SetMetrics(metrics *k8s.PodMetrics)
- func (m *MetricsPanel) SetPod(pod *k8s.PodInfo)
- func (m *MetricsPanel) SetSize(width, height int)
- func (m MetricsPanel) Update(msg tea.Msg) (MetricsPanel, tea.Cmd)
- func (m MetricsPanel) View() string
- type Navigator
- func (n *Navigator) ClearSearch()
- func (n *Navigator) CloseSearch()
- func (n Navigator) HasFilter() bool
- func (n Navigator) Init() tea.Cmd
- func (n Navigator) IsSearching() bool
- func (n Navigator) Mode() NavigatorMode
- func (n Navigator) Render(width int) string
- func (n Navigator) ResourceType() k8s.ResourceType
- func (n Navigator) SelectedNamespace() string
- func (n Navigator) SelectedPod() *k8s.PodInfo
- func (n Navigator) SelectedResourceType() k8s.ResourceType
- func (n Navigator) SelectedWorkload() *k8s.WorkloadInfo
- func (n *Navigator) SetMode(mode NavigatorMode)
- func (n *Navigator) SetNamespaces(namespaces []string)
- func (n *Navigator) SetPods(pods []k8s.PodInfo)
- func (n *Navigator) SetResourceType(rt k8s.ResourceType)
- func (n *Navigator) SetSize(width, height int)
- func (n *Navigator) SetWorkloads(workloads []k8s.WorkloadInfo)
- func (n Navigator) Update(msg tea.Msg) (Navigator, tea.Cmd)
- func (n Navigator) View() string
- type NavigatorMode
- type PodActionItem
- type PodActionMenu
- type PodActionMenuResult
- type ResultViewer
- func (r *ResultViewer) Hide()
- func (r ResultViewer) Init() tea.Cmd
- func (r ResultViewer) IsVisible() bool
- func (r *ResultViewer) SetSize(width, height int)
- func (r *ResultViewer) Show(title, content string, width, height int)
- func (r ResultViewer) Update(msg tea.Msg) (ResultViewer, tea.Cmd)
- func (r ResultViewer) View() string
- type StatusBar
- type TimeFilter
- type WorkloadActionItem
- type WorkloadActionMenu
- func (m *WorkloadActionMenu) Hide()
- func (m WorkloadActionMenu) Init() tea.Cmd
- func (m WorkloadActionMenu) IsVisible() bool
- func (m *WorkloadActionMenu) Show(title string, items []WorkloadActionItem)
- func (m WorkloadActionMenu) Update(msg tea.Msg) (WorkloadActionMenu, tea.Cmd)
- func (m WorkloadActionMenu) View() string
- type WorkloadActionMenuResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyToClipboard ¶
CopyToClipboard copies text to the system clipboard
Types ¶
type ActionMenu ¶
type ActionMenu struct {
// contains filtered or unexported fields
}
ActionMenu is a popup menu for actions
func NewActionMenu ¶
func NewActionMenu() ActionMenu
func (*ActionMenu) Hide ¶
func (m *ActionMenu) Hide()
func (ActionMenu) Init ¶
func (m ActionMenu) Init() tea.Cmd
func (ActionMenu) IsVisible ¶
func (m ActionMenu) IsVisible() bool
func (*ActionMenu) SetSize ¶
func (m *ActionMenu) SetSize(width, height int)
func (*ActionMenu) Show ¶
func (m *ActionMenu) Show(title string, items []MenuItem)
func (ActionMenu) Update ¶
func (m ActionMenu) Update(msg tea.Msg) (ActionMenu, tea.Cmd)
func (ActionMenu) View ¶
func (m ActionMenu) View() string
type ActionMenuResult ¶
ActionMenuResult is returned when an action is selected
type Breadcrumb ¶
type Breadcrumb struct {
// contains filtered or unexported fields
}
func NewBreadcrumb ¶
func NewBreadcrumb() Breadcrumb
func (*Breadcrumb) SetItems ¶
func (b *Breadcrumb) SetItems(items ...string)
func (*Breadcrumb) SetWidth ¶
func (b *Breadcrumb) SetWidth(width int)
func (Breadcrumb) View ¶
func (b Breadcrumb) View() string
type ConfirmDialog ¶
type ConfirmDialog struct {
// contains filtered or unexported fields
}
ConfirmDialog is a modal confirmation dialog
func NewConfirmDialog ¶
func NewConfirmDialog() ConfirmDialog
func (*ConfirmDialog) Hide ¶
func (c *ConfirmDialog) Hide()
func (ConfirmDialog) Init ¶
func (c ConfirmDialog) Init() tea.Cmd
func (ConfirmDialog) IsVisible ¶
func (c ConfirmDialog) IsVisible() bool
func (*ConfirmDialog) Show ¶
func (c *ConfirmDialog) Show(title, message, action string, data interface{})
func (ConfirmDialog) Update ¶
func (c ConfirmDialog) Update(msg tea.Msg) (ConfirmDialog, tea.Cmd)
func (ConfirmDialog) View ¶
func (c ConfirmDialog) View() string
type ConfirmResult ¶
ConfirmResult is returned when a confirmation is made
type EventsPanel ¶
type EventsPanel struct {
// contains filtered or unexported fields
}
func NewEventsPanel ¶
func NewEventsPanel() EventsPanel
func (EventsPanel) EventCount ¶
func (e EventsPanel) EventCount() int
func (EventsPanel) Init ¶
func (e EventsPanel) Init() tea.Cmd
func (EventsPanel) SelectedEvent ¶
func (e EventsPanel) SelectedEvent() *k8s.EventInfo
func (*EventsPanel) SetEvents ¶
func (e *EventsPanel) SetEvents(events []k8s.EventInfo)
func (*EventsPanel) SetSize ¶
func (e *EventsPanel) SetSize(width, height int)
func (EventsPanel) Update ¶
func (e EventsPanel) Update(msg tea.Msg) (EventsPanel, tea.Cmd)
func (EventsPanel) View ¶
func (e EventsPanel) View() string
func (EventsPanel) WarningCount ¶
func (e EventsPanel) WarningCount() int
type HelpPanel ¶
type HelpPanel struct {
// contains filtered or unexported fields
}
func NewHelpPanel ¶
func NewHelpPanel() HelpPanel
type LogsPanel ¶
type LogsPanel struct {
// contains filtered or unexported fields
}
func NewLogsPanel ¶
func NewLogsPanel() LogsPanel
func (LogsPanel) ErrorCount ¶
func (LogsPanel) IsFollowing ¶
func (LogsPanel) IsSearching ¶
func (LogsPanel) SelectedContainer ¶
func (*LogsPanel) SetContainers ¶
func (LogsPanel) ShowPrevious ¶
func (*LogsPanel) ToggleFollow ¶
func (l *LogsPanel) ToggleFollow()
type ManifestPanel ¶
type ManifestPanel struct {
// contains filtered or unexported fields
}
func NewManifestPanel ¶
func NewManifestPanel() ManifestPanel
func (ManifestPanel) Init ¶
func (m ManifestPanel) Init() tea.Cmd
func (*ManifestPanel) SetHelpers ¶
func (m *ManifestPanel) SetHelpers(helpers []k8s.DebugHelper)
func (*ManifestPanel) SetPod ¶
func (m *ManifestPanel) SetPod(pod *k8s.PodInfo)
func (*ManifestPanel) SetRelated ¶
func (m *ManifestPanel) SetRelated(related *k8s.RelatedResources)
func (*ManifestPanel) SetSize ¶
func (m *ManifestPanel) SetSize(width, height int)
func (ManifestPanel) Update ¶
func (m ManifestPanel) Update(msg tea.Msg) (ManifestPanel, tea.Cmd)
func (ManifestPanel) View ¶
func (m ManifestPanel) View() string
type ManifestViewMode ¶
type ManifestViewMode int
const ( ManifestViewSummary ManifestViewMode = iota ManifestViewDetails ManifestViewResources )
type MenuItem ¶
type MenuItem struct {
Label string
Value string // The command or value to copy/execute
Shortcut string // Single key shortcut (1-9)
}
MenuItem represents a single menu item
func KubectlCommands ¶
KubectlCommands generates common kubectl commands for a pod
type MetricsPanel ¶
type MetricsPanel struct {
// contains filtered or unexported fields
}
func NewMetricsPanel ¶
func NewMetricsPanel() MetricsPanel
func (MetricsPanel) Init ¶
func (m MetricsPanel) Init() tea.Cmd
func (MetricsPanel) IsAvailable ¶
func (m MetricsPanel) IsAvailable() bool
func (*MetricsPanel) SetMetrics ¶
func (m *MetricsPanel) SetMetrics(metrics *k8s.PodMetrics)
func (*MetricsPanel) SetPod ¶
func (m *MetricsPanel) SetPod(pod *k8s.PodInfo)
func (*MetricsPanel) SetSize ¶
func (m *MetricsPanel) SetSize(width, height int)
func (MetricsPanel) Update ¶
func (m MetricsPanel) Update(msg tea.Msg) (MetricsPanel, tea.Cmd)
func (MetricsPanel) View ¶
func (m MetricsPanel) View() string
type Navigator ¶
type Navigator struct {
// contains filtered or unexported fields
}
func NewNavigator ¶
func NewNavigator() Navigator
func (*Navigator) ClearSearch ¶
func (n *Navigator) ClearSearch()
func (*Navigator) CloseSearch ¶
func (n *Navigator) CloseSearch()
func (Navigator) IsSearching ¶
func (Navigator) Mode ¶
func (n Navigator) Mode() NavigatorMode
func (Navigator) ResourceType ¶
func (n Navigator) ResourceType() k8s.ResourceType
func (Navigator) SelectedNamespace ¶
func (Navigator) SelectedPod ¶
func (Navigator) SelectedResourceType ¶
func (n Navigator) SelectedResourceType() k8s.ResourceType
func (Navigator) SelectedWorkload ¶
func (n Navigator) SelectedWorkload() *k8s.WorkloadInfo
func (*Navigator) SetMode ¶
func (n *Navigator) SetMode(mode NavigatorMode)
func (*Navigator) SetNamespaces ¶
func (*Navigator) SetResourceType ¶
func (n *Navigator) SetResourceType(rt k8s.ResourceType)
func (*Navigator) SetWorkloads ¶
func (n *Navigator) SetWorkloads(workloads []k8s.WorkloadInfo)
type NavigatorMode ¶
type NavigatorMode int
const ( ModeWorkloads NavigatorMode = iota ModePods ModeNamespace ModeResourceType )
type PodActionItem ¶
type PodActionItem struct {
Label string
Description string
Action string // "delete", "exec", "port-forward", "copy"
Command string // kubectl command if applicable
}
PodActionItem represents an action that can be taken on a pod
func PodActions ¶
func PodActions(namespace, podName string, containers []string) []PodActionItem
PodActions returns the available actions for a pod
type PodActionMenu ¶
type PodActionMenu struct {
// contains filtered or unexported fields
}
PodActionMenu is similar to ActionMenu but for pod actions
func NewPodActionMenu ¶
func NewPodActionMenu() PodActionMenu
func (*PodActionMenu) Hide ¶
func (m *PodActionMenu) Hide()
func (PodActionMenu) Init ¶
func (m PodActionMenu) Init() tea.Cmd
func (PodActionMenu) IsVisible ¶
func (m PodActionMenu) IsVisible() bool
func (*PodActionMenu) Show ¶
func (m *PodActionMenu) Show(title string, items []PodActionItem)
func (PodActionMenu) Update ¶
func (m PodActionMenu) Update(msg tea.Msg) (PodActionMenu, tea.Cmd)
func (PodActionMenu) View ¶
func (m PodActionMenu) View() string
type PodActionMenuResult ¶
type PodActionMenuResult struct {
Item PodActionItem
}
PodActionMenuResult is returned when a pod action is selected
type ResultViewer ¶
type ResultViewer struct {
// contains filtered or unexported fields
}
ResultViewer displays command output in a scrollable viewport
func NewResultViewer ¶
func NewResultViewer() ResultViewer
func (*ResultViewer) Hide ¶
func (r *ResultViewer) Hide()
func (ResultViewer) Init ¶
func (r ResultViewer) Init() tea.Cmd
func (ResultViewer) IsVisible ¶
func (r ResultViewer) IsVisible() bool
func (*ResultViewer) SetSize ¶
func (r *ResultViewer) SetSize(width, height int)
func (*ResultViewer) Show ¶
func (r *ResultViewer) Show(title, content string, width, height int)
func (ResultViewer) Update ¶
func (r ResultViewer) Update(msg tea.Msg) (ResultViewer, tea.Cmd)
func (ResultViewer) View ¶
func (r ResultViewer) View() string
type StatusBar ¶
type StatusBar struct {
// contains filtered or unexported fields
}
func NewStatusBar ¶
func NewStatusBar() StatusBar
func (*StatusBar) SetContext ¶
func (*StatusBar) SetNamespace ¶
func (*StatusBar) SetResource ¶
type TimeFilter ¶
type TimeFilter int
const ( TimeFilterAll TimeFilter = iota TimeFilter5Min TimeFilter15Min TimeFilter1Hour TimeFilter6Hours )
type WorkloadActionItem ¶
type WorkloadActionItem struct {
Label string
Description string
Action string // "scale", "restart", "copy"
Replicas int32 // For scale actions
Command string // kubectl command
}
WorkloadActionItem represents an action for workloads
func ScaleActions ¶
func ScaleActions(namespace, name, resourceType string, currentReplicas int32) []WorkloadActionItem
ScaleActions returns scale options for a workload
type WorkloadActionMenu ¶
type WorkloadActionMenu struct {
// contains filtered or unexported fields
}
WorkloadActionMenu for workload actions
func NewWorkloadActionMenu ¶
func NewWorkloadActionMenu() WorkloadActionMenu
func (*WorkloadActionMenu) Hide ¶
func (m *WorkloadActionMenu) Hide()
func (WorkloadActionMenu) Init ¶
func (m WorkloadActionMenu) Init() tea.Cmd
func (WorkloadActionMenu) IsVisible ¶
func (m WorkloadActionMenu) IsVisible() bool
func (*WorkloadActionMenu) Show ¶
func (m *WorkloadActionMenu) Show(title string, items []WorkloadActionItem)
func (WorkloadActionMenu) Update ¶
func (m WorkloadActionMenu) Update(msg tea.Msg) (WorkloadActionMenu, tea.Cmd)
func (WorkloadActionMenu) View ¶
func (m WorkloadActionMenu) View() string
type WorkloadActionMenuResult ¶
type WorkloadActionMenuResult struct {
Item WorkloadActionItem
}
WorkloadActionMenuResult is returned when a workload action is selected