Versions in this module Expand all Collapse all v1 v1.1.0 Jan 4, 2023 v1.0.12 Nov 15, 2022 v1.0.11 Nov 11, 2022 v1.0.10 Nov 10, 2022 v1.0.9 Nov 10, 2022 v1.0.8 Nov 9, 2022 v1.0.7 Nov 9, 2022 v1.0.6 Nov 9, 2022 v1.0.5 Nov 9, 2022 v1.0.4 Nov 9, 2022 v1.0.3 Nov 8, 2022 Changes in this version + const ManagedFieldsOpts + const MaxHistory + var Registry = map[string]ResourceMeta + func FQN(ns, n string) string + func MetaFQN(m metav1.ObjectMeta) string + func NewExpBackOff(ctx context.Context, start, max time.Duration) backoff.BackOffContext + func NormalizeVersion(version string) string + func Truncate(str string, width int) string + type BuffWatcher interface + BufferActive func(state bool, kind BufferKind) + BufferChanged func(text, suggestion string) + BufferCompleted func(text, suggestion string) + type BufferKind int8 + const CommandBuffer + const FilterBuffer + type Cluster struct + func NewCluster(f dao.Factory) *Cluster + func (c *Cluster) ClusterName() string + func (c *Cluster) ContextName() string + func (c *Cluster) Metrics(ctx context.Context, mx *client.ClusterMetrics) error + func (c *Cluster) UserName() string + func (c *Cluster) Version() string + type ClusterInfo struct + func NewClusterInfo(f dao.Factory, v string) *ClusterInfo + func (c *ClusterInfo) AddListener(l ClusterInfoListener) + func (c *ClusterInfo) Refresh() + func (c *ClusterInfo) RemoveListener(l ClusterInfoListener) + func (c *ClusterInfo) Reset(f dao.Factory) + type ClusterInfoListener interface + ClusterInfoChanged func(prev, curr ClusterMeta) + ClusterInfoUpdated func(ClusterMeta) + type ClusterMeta struct + Cluster string + Context string + Cpu int + Ephemeral int + K8sVer string + K9sLatest string + K9sVer string + Mem int + User string + func NewClusterMeta() ClusterMeta + func (c ClusterMeta) Deltas(n ClusterMeta) bool + type CmdBuff struct + func NewCmdBuff(key rune, kind BufferKind) *CmdBuff + func (c *CmdBuff) Add(r rune) + func (c *CmdBuff) AddListener(w BuffWatcher) + func (c *CmdBuff) ClearText(fire bool) + func (c *CmdBuff) Delete() + func (c *CmdBuff) Empty() bool + func (c *CmdBuff) GetKind() BufferKind + func (c *CmdBuff) GetSuggestion() string + func (c *CmdBuff) GetText() string + func (c *CmdBuff) InCmdMode() bool + func (c *CmdBuff) IsActive() bool + func (c *CmdBuff) RemoveListener(l BuffWatcher) + func (c *CmdBuff) Reset() + func (c *CmdBuff) SetActive(b bool) + func (c *CmdBuff) SetText(text, suggestion string) + type Commander interface + InCmdMode func() bool + type Component interface + type Cruder interface + Get func(ctx context.Context, path string) (runtime.Object, error) + List func(ctx context.Context, ns string) ([]runtime.Object, error) + type Describe struct + func NewDescribe(gvr client.GVR, path string) *Describe + func (d *Describe) AddListener(l ResourceViewerListener) + func (d *Describe) ClearFilter() + func (d *Describe) Filter(q string) + func (d *Describe) GetPath() string + func (d *Describe) Peek() []string + func (d *Describe) Refresh(ctx context.Context) error + func (d *Describe) RemoveListener(l ResourceViewerListener) + func (d *Describe) SetOptions(context.Context, ViewerToggleOpts) + func (d *Describe) Watch(ctx context.Context) error + type Describer interface + Describe func(client client.Connection, gvr, path string) (string, error) + ToYAML func(ctx context.Context, path string) (string, error) + type Filterable interface + ClearFilter func() + Filter func(string) + type FishBuff struct + func NewFishBuff(key rune, kind BufferKind) *FishBuff + func (f *FishBuff) Add(r rune) + func (f *FishBuff) AutoSuggests() bool + func (f *FishBuff) ClearSuggestions() + func (f *FishBuff) CurrentSuggestion() (string, bool) + func (f *FishBuff) Delete() + func (f *FishBuff) NextSuggestion() (string, bool) + func (f *FishBuff) Notify(delete bool) + func (f *FishBuff) PrevSuggestion() (string, bool) + func (f *FishBuff) SetSuggestionFn(fn SuggestionFunc) + func (f *FishBuff) Suggestions() []string + type Flash struct + func NewFlash(dur time.Duration) *Flash + func (f *Flash) Channel() FlashChan + func (f *Flash) Clear() + func (f *Flash) Err(err error) + func (f *Flash) Errf(fmat string, args ...interface{}) + func (f *Flash) Info(msg string) + func (f *Flash) Infof(fmat string, args ...interface{}) + func (f *Flash) SetMessage(level FlashLevel, msg string) + func (f *Flash) Warn(msg string) + func (f *Flash) Warnf(fmat string, args ...interface{}) + type FlashChan chan LevelMessage + type FlashLevel int + const DefaultFlashDelay + const FlashErr + const FlashInfo + const FlashWarn + type FlashListener interface + FlashChanged func(FlashLevel, string) + FlashCleared func() + type Generic interface + Header func(string) render.Header + Render func(interface{}, string, *render.Row) error + SetTable func(*metav1beta1.Table) + type Hint struct + func NewHint() *Hint + func (h *Hint) AddListener(l HintListener) + func (h *Hint) Peek() MenuHints + func (h *Hint) RemoveListener(l HintListener) + func (h *Hint) SetHints(hh MenuHints) + type HintListener interface + HintsChanged func(MenuHints) + type Hinter interface + ExtraHints func() map[string]string + Hints func() MenuHints + type History struct + func NewHistory(limit int) *History + func (h *History) Clear() + func (h *History) Empty() bool + func (h *History) List() []string + func (h *History) Push(c string) + type Igniter interface + Init func(ctx context.Context) error + Start func() + Stop func() + type LevelMessage struct + Level FlashLevel + Text string + func (l LevelMessage) IsClear() bool + type Lister interface + Init func(ns, gvr string, f dao.Factory) + type Log struct + func NewLog(gvr client.GVR, opts *dao.LogOptions, flushTimeout time.Duration) *Log + func (l *Log) AddListener(listener LogsListener) + func (l *Log) Append(line *dao.LogItem) + func (l *Log) Clear() + func (l *Log) ClearFilter() + func (l *Log) Configure(opts *config.Logger) + func (l *Log) Filter(q string) + func (l *Log) GVR() client.GVR + func (l *Log) GetContainer() string + func (l *Log) GetPath() string + func (l *Log) HasDefaultContainer() bool + func (l *Log) Head(ctx context.Context) + func (l *Log) Init(f dao.Factory) + func (l *Log) IsHead() bool + func (l *Log) LogOptions() *dao.LogOptions + func (l *Log) Notify() + func (l *Log) Refresh() + func (l *Log) RemoveListener(listener LogsListener) + func (l *Log) Restart(ctx context.Context) + func (l *Log) Set(lines *dao.LogItems) + func (l *Log) SetSinceSeconds(ctx context.Context, i int64) + func (l *Log) SinceSeconds() int64 + func (l *Log) Start(ctx context.Context) + func (l *Log) Stop() + func (l *Log) ToggleAllContainers(ctx context.Context) + func (l *Log) ToggleShowTimestamp(b bool) + type LogsListener interface + LogCanceled func() + LogChanged func([][]byte) + LogCleared func() + LogFailed func(error) + LogResume func() + LogStop func() + type MenuHint struct + Description string + Mnemonic string + Visible bool + func (m MenuHint) IsBlank() bool + func (m MenuHint) String() string + type MenuHints []MenuHint + func (h MenuHints) Len() int + func (h MenuHints) Less(i, j int) bool + func (h MenuHints) Swap(i, j int) + type MetricsServer interface + ClusterLoad func(*v1.NodeList, *mv1beta1.NodeMetricsList, *client.ClusterMetrics) error + NodesMetrics func(*v1.NodeList, *mv1beta1.NodeMetricsList, client.NodesMetrics) + PodsMetrics func(*mv1beta1.PodMetricsList, client.PodsMetrics) + type MetricsService interface + FetchNodesMetrics func(ctx context.Context) (*mv1beta1.NodeMetricsList, error) + FetchPodsMetrics func(ctx context.Context, ns string) (*mv1beta1.PodMetricsList, error) + HasMetrics func() bool + type Primitive interface + Name func() string + type Pulse struct + func NewPulse(gvr string) *Pulse + func (p *Pulse) AddListener(l PulseListener) + func (p *Pulse) GetNamespace() string + func (p *Pulse) Refresh(ctx context.Context) + func (p *Pulse) RemoveListener(l PulseListener) + func (p *Pulse) SetNamespace(ns string) + func (p *Pulse) Watch(ctx context.Context) + type PulseHealth struct + func NewPulseHealth(f dao.Factory) *PulseHealth + func (h *PulseHealth) List(ctx context.Context, ns string) ([]runtime.Object, error) + type PulseListener interface + PulseChanged func(*health.Check) + PulseFailed func(error) + type Renderer interface + ColorerFunc func() render.ColorerFunc + Header func(ns string) render.Header + IsGeneric func() bool + Render func(o interface{}, ns string, row *render.Row) error + type ResourceMeta struct + DAO dao.Accessor + Renderer Renderer + TreeRenderer TreeRenderer + type ResourceViewer interface + AddListener func(ResourceViewerListener) + ClearFilter func() + Filter func(string) + GetPath func() string + Peek func() []string + Refresh func(context.Context) error + RemoveListener func(ResourceViewerListener) + SetOptions func(context.Context, ViewerToggleOpts) + Watch func(context.Context) error + type ResourceViewerListener interface + ResourceChanged func(lines []string, matches fuzzy.Matches) + ResourceFailed func(error) + type SemVer struct + Major int + Minor int + Patch int + func NewSemVer(version string) *SemVer + func (v *SemVer) IsCurrent(latest *SemVer) bool + func (v *SemVer) String() string + type Stack struct + func NewStack() *Stack + func (s *Stack) AddListener(l StackListener) + func (s *Stack) Clear() + func (s *Stack) Dump() + func (s *Stack) Empty() bool + func (s *Stack) Flatten() []string + func (s *Stack) IsLast() bool + func (s *Stack) Peek() []Component + func (s *Stack) Pop() (Component, bool) + func (s *Stack) Previous() Component + func (s *Stack) Push(c Component) + func (s *Stack) RemoveListener(l StackListener) + func (s *Stack) Top() Component + type StackAction int + const StackPop + const StackPush + type StackEvent struct + Action StackAction + Component Component + type StackListener interface + StackPopped func(old, new Component) + StackPushed func(Component) + StackTop func(Component) + type SuggestionFunc func(text string) sort.StringSlice + type SuggestionListener interface + SuggestionChanged func(text, sugg string) + type Table struct + func NewTable(gvr client.GVR) *Table + func (t *Table) AddListener(l TableListener) + func (t *Table) ClusterWide() bool + func (t *Table) Count() int + func (t *Table) Delete(ctx context.Context, path string, propagation *metav1.DeletionPropagation, ...) error + func (t *Table) Empty() bool + func (t *Table) Get(ctx context.Context, path string) (runtime.Object, error) + func (t *Table) GetNamespace() string + func (t *Table) InNamespace(ns string) bool + func (t *Table) Peek() *render.TableData + func (t *Table) Refresh(ctx context.Context) error + func (t *Table) RemoveListener(l TableListener) + func (t *Table) SetInstance(path string) + func (t *Table) SetLabelFilter(f string) + func (t *Table) SetNamespace(ns string) + func (t *Table) SetRefreshRate(d time.Duration) + func (t *Table) Watch(ctx context.Context) error + type TableListener interface + TableDataChanged func(*render.TableData) + TableLoadFailed func(error) + type Text struct + func NewText() *Text + func (t *Text) AddListener(listener TextListener) + func (t *Text) ClearFilter() + func (t *Text) Filter(q string) + func (t *Text) Peek() []string + func (t *Text) RemoveListener(listener TextListener) + func (t *Text) SetText(buff string) + type TextListener interface + TextChanged func([]string) + TextFiltered func([]string, fuzzy.Matches) + type Textable interface + AddListener func(TextListener) + Peek func() []string + RemoveListener func(TextListener) + SetText func(string) + type Tree struct + func NewTree(gvr client.GVR) *Tree + func (t *Tree) AddListener(l TreeListener) + func (t *Tree) ClearFilter() + func (t *Tree) ClusterWide() bool + func (t *Tree) Describe(ctx context.Context, gvr, path string) (string, error) + func (t *Tree) Empty() bool + func (t *Tree) GetNamespace() string + func (t *Tree) InNamespace(ns string) bool + func (t *Tree) Peek() *xray.TreeNode + func (t *Tree) Refresh(ctx context.Context) + func (t *Tree) RemoveListener(l TreeListener) + func (t *Tree) SetFilter(q string) + func (t *Tree) SetNamespace(ns string) + func (t *Tree) SetRefreshRate(d time.Duration) + func (t *Tree) ToYAML(ctx context.Context, gvr, path string) (string, error) + func (t *Tree) Watch(ctx context.Context) + type TreeListener interface + TreeChanged func(*xray.TreeNode) + TreeLoadFailed func(error) + type TreeRenderer interface + Render func(ctx context.Context, ns string, o interface{}) error + type Values struct + func NewValues(gvr client.GVR, path string) *Values + func (v *Values) AddListener(l ResourceViewerListener) + func (v *Values) ClearFilter() + func (v *Values) Filter(q string) + func (v *Values) GetPath() string + func (v *Values) Peek() []string + func (v *Values) Refresh(ctx context.Context) error + func (v *Values) RemoveListener(l ResourceViewerListener) + func (v *Values) SetOptions(ctx context.Context, opts ViewerToggleOpts) + func (v *Values) ToggleValues() + func (v *Values) Watch(ctx context.Context) error + type ViewerToggleOpts map[string]bool + type YAML struct + func NewYAML(gvr client.GVR, path string) *YAML + func (y *YAML) AddListener(l ResourceViewerListener) + func (y *YAML) ClearFilter() + func (y *YAML) Filter(q string) + func (y *YAML) GetPath() string + func (y *YAML) Peek() []string + func (y *YAML) Refresh(ctx context.Context) error + func (y *YAML) RemoveListener(l ResourceViewerListener) + func (y *YAML) SetOptions(ctx context.Context, opts ViewerToggleOpts) + func (y *YAML) ToYAML(ctx context.Context, gvr client.GVR, path string, showManaged bool) (string, error) + func (y *YAML) Watch(ctx context.Context) error