Documentation
¶
Index ¶
- Constants
- Variables
- type ActionExtender
- type App
- func (a *App) ActiveView() model.Component
- func (a *App) BailOut()
- func (a *App) ClearStatus(flash bool)
- func (a *App) ConOK() bool
- func (a *App) Halt()
- func (a *App) Init(version string, rate int) error
- func (a *App) IsBenchmarking() bool
- func (a *App) PrevCmd(evt *tcell.EventKey) *tcell.EventKey
- func (a *App) Resume()
- func (a *App) Run() error
- func (a *App) Status(l model.FlashLevel, msg string)
- type BindKeysFunc
- type BoostActionsFunc
- type Browser
- func (b *Browser) Aliases() []string
- func (b *Browser) BufferActive(state bool, k model.BufferKind)
- func (b *Browser) BufferChanged(_, _ string)
- func (b *Browser) BufferCompleted(text, _ string)
- func (b *Browser) GetTable() *Table
- func (b *Browser) InCmdMode() bool
- func (b *Browser) Init(ctx context.Context) error
- func (b *Browser) Name() string
- func (b *Browser) Refresh()
- func (b *Browser) SetContextFn(f ContextFunc)
- func (b *Browser) SetInstance(path string)
- func (b *Browser) Start()
- func (b *Browser) Stop()
- func (b *Browser) TableDataChanged(data render.TableData)
- func (b *Browser) TableLoadFailed(err error)
- func (b *Browser) TableTick()
- type ClusterInfo
- func (c *ClusterInfo) AddListener(l ClusterInfoListener)
- func (c *ClusterInfo) Init()
- func (c *ClusterInfo) RemoveListener(l ClusterInfoListener)
- func (c *ClusterInfo) StylesChanged(s *config.Styles)
- func (c *ClusterInfo) TableDataChanged(data render.TableData)
- func (c *ClusterInfo) TableLoadFailed(_ error)
- type ClusterInfoListener
- type Command
- type ContextFunc
- type Cow
- func (c *Cow) Actions() ui.KeyActions
- func (c *Cow) ExtraHints() map[string]string
- func (c *Cow) Hints() model.MenuHints
- func (*Cow) InCmdMode() bool
- func (c *Cow) Init(_ context.Context) error
- func (c *Cow) Name() string
- func (c *Cow) Start()
- func (c *Cow) Stop()
- func (c *Cow) StylesChanged(s *config.Styles)
- type EnterFunc
- type Help
- type HelpFunc
- type Hinter
- type LogViewer
- type MetaViewer
- type MetaViewers
- type Namespace
- type Node
- type PageStack
- type Process
- type ResourceViewer
- type RestartableViewer
- type Runner
- type ScalableViewer
- type SubjectViewer
- type Table
- func (t *Table) AddBindKeysFn(f BindKeysFunc)
- func (t *Table) App() *App
- func (t *Table) BufferActive(state bool, k model.BufferKind)
- func (t *Table) BufferChanged(_, _ string)
- func (t *Table) BufferCompleted(text, _ string)
- func (t *Table) HeaderIndex(colName string) (int, bool)
- func (t *Table) Init(ctx context.Context) (err error)
- func (t *Table) Name() string
- func (t *Table) SendKey(evt *tcell.EventKey)
- func (t *Table) SetEnterFn(f EnterFunc)
- func (t *Table) SetExtraActionsFn(BoostActionsFunc)
- func (t *Table) Start()
- func (t *Table) Stop()
- type TableViewer
- type Viewer
- type ViewerFunc
Constants ¶
const AllScopes = "all"
AllScopes represents actions available for all views.
Variables ¶
var (
ExitStatus = ""
)
ExitStatus indicates UI exit conditions.
Functions ¶
This section is empty.
Types ¶
type ActionExtender ¶
type ActionExtender interface { // BindKeys injects new menu actions. BindKeys(ResourceViewer) }
ActionExtender enhances a given viewer by adding new menu actions.
type App ¶
App represents an application view.
func (*App) ActiveView ¶
ActiveView returns the currently active view.
func (*App) ClearStatus ¶
ClearStatus reset logo back to normal.
func (*App) IsBenchmarking ¶
IsBenchmarking check if benchmarks are active.
type BoostActionsFunc ¶
type BoostActionsFunc func(ui.KeyActions)
BoostActionsFunc extends viewer keyboard actions.
type Browser ¶
type Browser struct { *Table // contains filtered or unexported fields }
Browser represents a generic resource browser.
func (*Browser) BufferActive ¶
func (b *Browser) BufferActive(state bool, k model.BufferKind)
BufferActive indicates the buff activity changed.
func (*Browser) BufferChanged ¶
BufferChanged indicates the buffer was changed.
func (*Browser) BufferCompleted ¶
BufferCompleted indicates input was accepted.
func (*Browser) SetContextFn ¶
func (b *Browser) SetContextFn(f ContextFunc)
SetContextFn populates a custom context.
func (*Browser) SetInstance ¶
SetInstance sets a single instance view.
func (*Browser) TableDataChanged ¶
TableDataChanged notifies view new data is available.
func (*Browser) TableLoadFailed ¶
TableLoadFailed notifies view something went south.
type ClusterInfo ¶
ClusterInfo represents a cluster info view.
func NewClusterInfo ¶
func NewClusterInfo(app *App) *ClusterInfo
NewClusterInfo returns a new cluster info view.
func (*ClusterInfo) AddListener ¶
func (c *ClusterInfo) AddListener(l ClusterInfoListener)
AddListener adds a new model listener.
func (*ClusterInfo) RemoveListener ¶
func (c *ClusterInfo) RemoveListener(l ClusterInfoListener)
RemoveListener delete a listener from the list.
func (*ClusterInfo) StylesChanged ¶
func (c *ClusterInfo) StylesChanged(s *config.Styles)
StylesChanged notifies skin changed.
func (*ClusterInfo) TableDataChanged ¶
func (c *ClusterInfo) TableDataChanged(data render.TableData)
func (*ClusterInfo) TableLoadFailed ¶
func (c *ClusterInfo) TableLoadFailed(_ error)
type ClusterInfoListener ¶
type ClusterInfoListener interface { // ClusterInfoChanged notifies the cluster meta was changed. ClusterInfoChanged(c model.Cluster) }
ClusterInfoListener registers a listener for model changes.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command represents a user command.
type ContextFunc ¶
ContextFunc enhances a given context.
type Cow ¶
Cow represents a bomb viewer.
func (*Cow) ExtraHints ¶
ExtraHints returns additional hints.
func (*Cow) StylesChanged ¶
StylesChanged notifies the skin changes.
type Help ¶
type Help struct { *Table // contains filtered or unexported fields }
Help presents a help viewer.
func (*Help) StylesChanged ¶
StylesChanged notifies skin changed.
type LogViewer ¶
type LogViewer interface { ResourceViewer ShowLogs(prev bool) }
LogViewer represents a log viewer.
type MetaViewer ¶
type MetaViewer struct {
// contains filtered or unexported fields
}
MetaViewer represents a registered meta viewer.
type MetaViewers ¶
type MetaViewers map[string]MetaViewer
MetaViewers represents a collection of meta viewers.
type Namespace ¶
type Namespace struct { ResourceViewer // contains filtered or unexported fields }
Namespace represents a namespace viewer.
type PageStack ¶
PageStack represents a stack of pages.
func (*PageStack) StackPopped ¶
StackPopped notifies a page was removed.
func (*PageStack) StackPushed ¶
StackPushed notifies a new page was added.
type Process ¶
type Process struct { ResourceViewer // contains filtered or unexported fields }
Process represents a process viewer.
type ResourceViewer ¶
type ResourceViewer interface { TableViewer // SetContextFn provision a custom context. SetContextFn(ContextFunc) // AddBindKeysFn provision additional key bindings. AddBindKeysFn(BindKeysFunc) // SetInstance sets a parent FQN SetInstance(string) }
ResourceViewer represents a generic resource viewer.
func NewBrowser ¶
func NewBrowser(cat string, fn dao.FactoryFn) ResourceViewer
NewBrowser returns a new browser.
type RestartableViewer ¶
type RestartableViewer interface { LogViewer }
RestartableViewer represents a viewer with restartable resources.
type ScalableViewer ¶
type ScalableViewer interface { LogViewer }
ScalableViewer represents a viewer with scalable resources.
type SubjectViewer ¶
type SubjectViewer interface { ResourceViewer // SetSubject sets the active subject. SetSubject(s string) }
SubjectViewer represents a policy viewer.
type Table ¶
Table represents a table viewer.
func (*Table) AddBindKeysFn ¶
func (t *Table) AddBindKeysFn(f BindKeysFunc)
AddBindKeysFn adds additional key bindings.
func (*Table) BufferActive ¶
func (t *Table) BufferActive(state bool, k model.BufferKind)
BufferActive indicates the buff activity changed.
func (*Table) BufferChanged ¶
BufferChanged indicates the buffer was changed.
func (*Table) BufferCompleted ¶
BufferCompleted indicates input was accepted.
func (*Table) HeaderIndex ¶
HeaderIndex returns index of a given column or false if not found.
func (*Table) SendKey ¶
func (t *Table) SendKey(evt *tcell.EventKey)
SendKey sends an keyboard event (testing only!).
func (*Table) SetEnterFn ¶
SetEnterFn specifies the default enter behavior.
func (*Table) SetExtraActionsFn ¶
func (t *Table) SetExtraActionsFn(BoostActionsFunc)
SetExtraActionsFn specifies custom keyboard behavior.
type TableViewer ¶
TableViewer represents a tabular viewer.
type Viewer ¶
type Viewer interface { model.Component // Actions returns active menu bindings. Actions() ui.KeyActions // App returns an app handle. App() *App // Refresh updates the viewer Refresh() }
Viewer represents a component viewer.
type ViewerFunc ¶
type ViewerFunc func() ResourceViewer
ViewerFunc returns a viewer matching a given gvr.