Documentation
¶
Index ¶
- type EventListener
- type Mode
- type StatusBar
- type UI
- func (ui *UI) AddContainer(name string)
- func (ui *UI) AddPagerText(line string)
- func (ui *UI) AddPod(name string, status types.PodStatus)
- func (ui *UI) ClearContainers()
- func (ui *UI) ClearPager()
- func (ui *UI) DeletePod(name string)
- func (ui *UI) DisableFollowMode()
- func (ui *UI) EnableFollowMode()
- func (ui *UI) HandleEvent(ev tcell.Event) bool
- func (ui *UI) SelectContainerAt(index int)
- func (ui *UI) SelectPodAt(index int)
- func (ui *UI) SetContext(cluster, namespace string)
- func (ui *UI) SetPodStatus(name string, status types.PodStatus)
- func (ui *UI) SetStatusMode(mode Mode)
- func (ui *UI) WatchUIEvents(l EventListener)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventListener ¶
type EventListener interface { // OnQuit is invoked on the quit is required OnQuit() // OnPodSelected is invoked when the selected pod is changed OnPodSelected(name string, index int) // OnContainerSelected is invoked when the selected container is changed OnContainerSelected(name string, index int) }
EventListener is a listener interface for UI events
type StatusBar ¶
StatusBar is a status bar on the bottom of the UI
func (*StatusBar) SetContext ¶
SetContext sets current kubeconfig context (cluster name and namespace) on the status bar
func (*StatusBar) SetPodCount ¶
SetPodCount sets the count of the pods
type UI ¶
UI is an user interface for the logbook
func (*UI) AddContainer ¶
AddContainer adds container by the name into the tabs
func (*UI) AddPagerText ¶
AddPagerText adds text line into the pager
func (*UI) ClearContainers ¶
func (ui *UI) ClearContainers()
ClearContainers clears containers in the tabs
func (*UI) DisableFollowMode ¶
func (ui *UI) DisableFollowMode()
DisableFollowMode disables follow mode on the pager
func (*UI) EnableFollowMode ¶
func (ui *UI) EnableFollowMode()
EnableFollowMode enabled follow mode on the pager
func (*UI) HandleEvent ¶
HandleEvent handles events on tcell
func (*UI) SelectContainerAt ¶
SelectContainerAt selects a container by the index
func (*UI) SelectPodAt ¶
SelectPodAt selects a pod by the index
func (*UI) SetContext ¶
SetContext sets kubenetes context (the cluster name and the namespace)
func (*UI) SetPodStatus ¶
SetPodStatus updates the pod status by name to the status
func (*UI) SetStatusMode ¶
SetStatusMode sets the mode in the status bar
func (*UI) WatchUIEvents ¶
func (ui *UI) WatchUIEvents(l EventListener)
WatchUIEvents registers an EventListener for the UI