Documentation ¶
Index ¶
- type ActionExtender
- type Alias
- type App
- func (a *App) ActiveView() model.Component
- func (a *App) BailOut()
- func (a *App) ClearStatus(flash bool)
- func (a *App) Halt()
- func (a *App) Init(version string, rate int) error
- func (a *App) PrevCmd(evt *tcell.EventKey) *tcell.EventKey
- func (a *App) Resume()
- func (a *App) Run()
- func (a *App) Status(l ui.FlashLevel, msg string)
- type Benchmark
- type BindKeysFunc
- type BoostActionsFunc
- type Browser
- func (b *Browser) Aliases() []string
- func (b *Browser) GetTable() *Table
- func (b *Browser) Init(ctx context.Context) error
- func (b *Browser) Name() string
- 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)
- type Chart
- type ClusterInfo
- type Command
- type Container
- type ContainerFunc
- type Context
- type ContextFunc
- type CronJob
- type DaemonSet
- type Deploy
- type Details
- func (d *Details) Actions() ui.KeyActions
- func (d *Details) Hints() model.MenuHints
- func (d *Details) Init(_ context.Context) error
- func (d *Details) Name() string
- func (d *Details) SetSubject(s string)
- func (d *Details) Start()
- func (d *Details) Stop()
- func (d *Details) StylesChanged(s *config.Styles)
- func (d *Details) Update(buff string) *Details
- type EnterFunc
- type EnvFunc
- type Event
- type Group
- type Help
- type HelpFunc
- type Hinter
- type Job
- type K9sEnv
- type Log
- func (l *Log) BufferActive(state bool, k ui.BufferKind)
- func (l *Log) BufferChanged(s string)
- func (l *Log) Flush(lines []string)
- func (l *Log) GetModel() *model.Log
- func (l *Log) Hints() model.MenuHints
- func (l *Log) Indicator() *LogIndicator
- func (l *Log) Init(ctx context.Context) (err error)
- func (l *Log) LogChanged(lines []string)
- func (l *Log) LogCleared()
- func (l *Log) LogFailed(err error)
- func (l *Log) Logs() *Details
- func (l *Log) Name() string
- func (l *Log) SaveCmd(evt *tcell.EventKey) *tcell.EventKey
- func (l *Log) Start()
- func (l *Log) Stop()
- func (l *Log) StylesChanged(s *config.Styles)
- func (l *Log) ToggleAutoScrollCmd(evt *tcell.EventKey) *tcell.EventKey
- type LogIndicator
- type LogViewer
- type LogsExtender
- type MetaViewer
- type MetaViewers
- type Namespace
- type Node
- type PageStack
- type Picker
- type Pod
- type Policy
- type PortForward
- type Rbac
- type ReplicaSet
- type ResourceViewer
- func NewAlias(gvr client.GVR) ResourceViewer
- func NewBenchmark(gvr client.GVR) ResourceViewer
- func NewBrowser(gvr client.GVR) ResourceViewer
- func NewChart(gvr client.GVR) ResourceViewer
- func NewContainer(gvr client.GVR) ResourceViewer
- func NewContext(gvr client.GVR) ResourceViewer
- func NewCronJob(gvr client.GVR) ResourceViewer
- func NewDaemonSet(gvr client.GVR) ResourceViewer
- func NewDeploy(gvr client.GVR) ResourceViewer
- func NewEvent(gvr client.GVR) ResourceViewer
- func NewGroup(gvr client.GVR) ResourceViewer
- func NewJob(gvr client.GVR) ResourceViewer
- func NewLogsExtender(v ResourceViewer, f ContainerFunc) ResourceViewer
- func NewNamespace(gvr client.GVR) ResourceViewer
- func NewNode(gvr client.GVR) ResourceViewer
- func NewPod(gvr client.GVR) ResourceViewer
- func NewPortForward(gvr client.GVR) ResourceViewer
- func NewRbac(gvr client.GVR) ResourceViewer
- func NewReplicaSet(gvr client.GVR) ResourceViewer
- func NewRestartExtender(v ResourceViewer) ResourceViewer
- func NewScaleExtender(r ResourceViewer) ResourceViewer
- func NewScreenDump(gvr client.GVR) ResourceViewer
- func NewSecret(gvr client.GVR) ResourceViewer
- func NewService(gvr client.GVR) ResourceViewer
- func NewStatefulSet(gvr client.GVR) ResourceViewer
- func NewUser(gvr client.GVR) ResourceViewer
- func NewXray(gvr client.GVR) ResourceViewer
- type RestartExtender
- type RestartableViewer
- type Runner
- type ScalableViewer
- type ScaleExtender
- type ScreenDump
- type Secret
- type Service
- type StatefulSet
- type SubjectViewer
- type Table
- func (t *Table) App() *App
- func (t *Table) BufferActive(state bool, k ui.BufferKind)
- func (t *Table) BufferChanged(s string)
- func (t *Table) EnvFn() EnvFunc
- func (t *Table) GVR() string
- func (t *Table) Init(ctx context.Context) (err error)
- func (t *Table) Name() string
- func (t *Table) SetBindKeysFn(f BindKeysFunc)
- func (t *Table) SetEnterFn(f EnterFunc)
- func (t *Table) SetEnvFn(f EnvFunc)
- func (t *Table) SetExtraActionsFn(BoostActionsFunc)
- func (t *Table) Start()
- func (t *Table) Stop()
- type TableViewer
- type User
- type Viewer
- type ViewerFunc
- type Xray
- func (x *Xray) Actions() ui.KeyActions
- func (x *Xray) Aliases() []string
- func (x *Xray) App() *App
- func (x *Xray) BufferActive(state bool, k ui.BufferKind)
- func (x *Xray) BufferChanged(s string)
- func (x *Xray) ClearSelection()
- func (x *Xray) EnvFn() EnvFunc
- func (x *Xray) GVR() string
- func (x *Xray) GetSelectedItem() string
- func (x *Xray) GetTable() *Table
- func (x *Xray) Hints() model.MenuHints
- func (x *Xray) Init(ctx context.Context) error
- func (x *Xray) Name() string
- func (x *Xray) Refresh()
- func (x *Xray) SetBindKeysFn(BindKeysFunc)
- func (x *Xray) SetContextFn(ContextFunc)
- func (x *Xray) SetEnvFn(EnvFunc)
- func (x *Xray) SetInstance(string)
- func (x *Xray) Start()
- func (x *Xray) Stop()
- func (x *Xray) TreeChanged(node *xray.TreeNode)
- func (x *Xray) TreeLoadFailed(err error)
- func (x *Xray) TreeNodeSelected()
- func (x *Xray) UpdateTitle()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 log back to normal.
type Benchmark ¶
type Benchmark struct {
ResourceViewer
}
Benchmark represents a service benchmark results view.
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) SetContextFn ¶
func (b *Browser) SetContextFn(f ContextFunc)
SetContextFn populates a custom context.
func (*Browser) SetInstance ¶
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, mx *client.MetricsServer) *ClusterInfo
NewClusterInfo returns a new cluster info view.
func (*ClusterInfo) StylesChanged ¶
func (c *ClusterInfo) StylesChanged(s *config.Styles)
StylesChanged notifies skin changed.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command represents a user command.
type ContainerFunc ¶
type ContainerFunc func() string
ContainerFunc returns the active container name.
type ContextFunc ¶
ContextFunc enhances a given context.
type DaemonSet ¶
type DaemonSet struct {
ResourceViewer
}
DaemonSet represents a daemon set custom viewer.
type Details ¶
Details represents a generic text viewer.
func NewDetails ¶
NewDetails returns a details viewer.
func (*Details) StylesChanged ¶
StylesChanged notifies the skin changed.
type Help ¶
type Help struct { *Table // contains filtered or unexported fields }
Help presents a help viewer.
type Log ¶
Log represents a generic log viewer.
func (*Log) BufferActive ¶
func (l *Log) BufferActive(state bool, k ui.BufferKind)
BufferActive indicates the buff activity changed.
func (*Log) BufferChanged ¶
BufferChanged indicates the buffer was changed.
func (*Log) Indicator ¶
func (l *Log) Indicator() *LogIndicator
Indicator returns the scroll mode viewer.
func (*Log) StylesChanged ¶
StylesChanged reports skin changes.
type LogIndicator ¶
LogIndicator represents a log view indicator.
func NewLogIndicator ¶
func NewLogIndicator(cfg *config.Config, styles *config.Styles) *LogIndicator
NewLogIndicator returns a new indicator.
func (*LogIndicator) AutoScroll ¶
func (l *LogIndicator) AutoScroll() bool
AutoScroll reports the current scrolling status.
func (*LogIndicator) FullScreen ¶
func (l *LogIndicator) FullScreen() bool
FullScreen reports the current screen mode.
func (*LogIndicator) TextWrap ¶
func (l *LogIndicator) TextWrap() bool
TextWrap reports the current wrap mode.
func (*LogIndicator) ToggleAutoScroll ¶
func (l *LogIndicator) ToggleAutoScroll()
ToggleAutoScroll toggles the scroll mode.
func (*LogIndicator) ToggleFullScreen ¶
func (l *LogIndicator) ToggleFullScreen()
ToggleFullScreen toggles the screen mode.
func (*LogIndicator) ToggleTextWrap ¶
func (l *LogIndicator) ToggleTextWrap()
ToggleTextWrap toggles the wrap mode.
type LogViewer ¶
type LogViewer interface { ResourceViewer ShowLogs(prev bool) }
LogViewer represents a log viewer.
type LogsExtender ¶
type LogsExtender struct { ResourceViewer // contains filtered or unexported fields }
LogsExtender adds log actions to a given viewer.
type MetaViewer ¶
type MetaViewer struct {
// contains filtered or unexported fields
}
MetaViewer represents a registered meta viewer.
type MetaViewers ¶
type MetaViewers map[client.GVR]MetaViewer
MetaViewers represents a collection of meta viewers.
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 Policy ¶
type Policy struct { ResourceViewer // contains filtered or unexported fields }
Policy presents a RBAC rules viewer based on what a given user/group or sa can do.
type PortForward ¶
type PortForward struct { ResourceViewer // contains filtered or unexported fields }
PortForward presents active portforward viewer.
type ReplicaSet ¶
type ReplicaSet struct {
ResourceViewer
}
ReplicaSet presents a replicaset viewer.
type ResourceViewer ¶
type ResourceViewer interface { TableViewer // SetEnvFn sets a function to pull viewer env vars for plugins. SetEnvFn(EnvFunc) // GVR returns a resource descriptor. GVR() string // SetContextFn provision a custom context. SetContextFn(ContextFunc) // SetBindKeys provision additional key bindings. SetBindKeysFn(BindKeysFunc) SetInstance(string) }
ResourceViewer represents a generic resource viewer.
func NewBenchmark ¶
func NewBenchmark(gvr client.GVR) ResourceViewer
NewBenchmark returns a new viewer.
func NewContainer ¶
func NewContainer(gvr client.GVR) ResourceViewer
NewContainer returns a new container view.
func NewDaemonSet ¶
func NewDaemonSet(gvr client.GVR) ResourceViewer
NewDaemonSet returns a new viewer.
func NewDeploy ¶
func NewDeploy(gvr client.GVR) ResourceViewer
NewDeploy returns a new deployment view.
func NewLogsExtender ¶
func NewLogsExtender(v ResourceViewer, f ContainerFunc) ResourceViewer
NewLogsExtender returns a new extender.
func NewNamespace ¶
func NewNamespace(gvr client.GVR) ResourceViewer
NewNamespace returns a new viewer
func NewPortForward ¶
func NewPortForward(gvr client.GVR) ResourceViewer
NewPortForward returns a new viewer.
func NewReplicaSet ¶
func NewReplicaSet(gvr client.GVR) ResourceViewer
NewReplicaSet returns a new viewer.
func NewRestartExtender ¶
func NewRestartExtender(v ResourceViewer) ResourceViewer
NewRestartExtender returns a new extender.
func NewScaleExtender ¶
func NewScaleExtender(r ResourceViewer) ResourceViewer
NewScaleExtender returns a new extender.
func NewScreenDump ¶
func NewScreenDump(gvr client.GVR) ResourceViewer
NewScreenDump returns a new viewer.
func NewStatefulSet ¶
func NewStatefulSet(gvr client.GVR) ResourceViewer
NewStatefulSet returns a new viewer.
type RestartExtender ¶
type RestartExtender struct {
ResourceViewer
}
RestartExtender represents a restartable resource.
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 ScaleExtender ¶
type ScaleExtender struct {
ResourceViewer
}
ScaleExtender adds scaling extensions.
type ScreenDump ¶
type ScreenDump struct {
ResourceViewer
}
ScreenDump presents a directory listing viewer.
type Service ¶
type Service struct { ResourceViewer // contains filtered or unexported fields }
Service represents a service viewer.
type StatefulSet ¶
type StatefulSet struct {
ResourceViewer
}
StatefulSet represents a statefulset viewer.
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) BufferActive ¶
func (t *Table) BufferActive(state bool, k ui.BufferKind)
BufferActive indicates the buff activity changed.
func (*Table) BufferChanged ¶
BufferChanged indicates the buffer was changed.
func (*Table) SetBindKeysFn ¶
func (t *Table) SetBindKeysFn(f BindKeysFunc)
SetBindKeysFn adds additional key bindings.
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(client.GVR) ResourceViewer
ViewerFunc returns a viewer matching a given gvr.
type Xray ¶
Xray represents an xray tree view.
func (*Xray) BufferActive ¶
func (x *Xray) BufferActive(state bool, k ui.BufferKind)
BufferActive indicates the buff activity changed.
func (*Xray) BufferChanged ¶
BufferChanged indicates the buffer was changed.
func (*Xray) ClearSelection ¶
func (x *Xray) ClearSelection()
ClearSelection clears the currently selected node.
func (*Xray) GetSelectedItem ¶
func (*Xray) SetBindKeysFn ¶
func (x *Xray) SetBindKeysFn(BindKeysFunc)
SetBindKeysFn sets up extra key bindings.
func (*Xray) SetContextFn ¶
func (x *Xray) SetContextFn(ContextFunc)
SetContextFn sets custom context.
func (*Xray) SetInstance ¶
SetInstance sets specific resource instance.
func (*Xray) TreeChanged ¶
XrayDataChanged notifies the model data changed.
func (*Xray) TreeLoadFailed ¶
XrayLoadFailed notifies the load failed.
func (*Xray) TreeNodeSelected ¶
func (x *Xray) TreeNodeSelected()
TreeNodeSelected callback for node selection.
Source Files ¶
- actions.go
- alias.go
- app.go
- benchmark.go
- browser.go
- charts.go
- cluster_info.go
- command.go
- container.go
- context.go
- cronjob.go
- details.go
- dp.go
- ds.go
- env.go
- event.go
- exec.go
- group.go
- help.go
- helpers.go
- job.go
- log.go
- log_indicator.go
- logs_extender.go
- node.go
- ns.go
- page_stack.go
- picker.go
- pod.go
- policy.go
- port_forward.go
- rbac.go
- registrar.go
- restart_extender.go
- rs.go
- scale_extender.go
- screen_dump.go
- secret.go
- sts.go
- svc.go
- table.go
- table_helper.go
- types.go
- user.go
- xray.go
- yaml.go