Documentation ¶
Index ¶
- Variables
- type GroupKindFunc
- type ResourceMenu
- func (r *ResourceMenu) ConfigUpdated(config *pb.Config)
- func (r *ResourceMenu) OnKeyPress(row commander.Row, event *tcell.EventKey) bool
- func (r *ResourceMenu) OnShow()
- func (r *ResourceMenu) SelectItem(id string)
- func (r *ResourceMenu) UpdateMenu(items []*pb.Resource) ([]commander.Operation, error)
- type SelectFunc
- type WidgetConstructor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StandardWidget WidgetConstructor = func(workspace commander.Workspace, resource *commander.Resource, format listTable.TableFormat) commander.Widget { return listTable.NewResourceListTable(workspace, resource, format) } CustomWidgets = map[string]WidgetConstructor{ "Pod": func(workspace commander.Workspace, resource *commander.Resource, format listTable.TableFormat) commander.Widget { return pod.NewPodsList(workspace, resource, format) }, } DefaultItems = []*pb.Resource{ {Kind: "Namespace", Group: "", Title: "Namespaces"}, {Kind: "Node", Group: "", Title: "Nodes"}, {Kind: "StorageClass", Group: "storage.k8s.io", Title: "Storage"}, {Kind: "PersistentVolume", Group: "", Title: "Volumes"}, {Namespaced: true, Kind: "Deployment", Group: "apps", Title: "Deployments"}, {Namespaced: true, Kind: "StatefulSet", Group: "apps", Title: "Stateful"}, {Namespaced: true, Kind: "DaemonSet", Group: "apps", Title: "Daemons"}, {Namespaced: true, Kind: "ReplicaSet", Group: "apps", Title: "Replicas"}, {Namespaced: true, Kind: "Pod", Group: "", Title: "Pods"}, {Namespaced: true, Kind: "CronJob", Group: "batch", Title: "Cron Jobs"}, {Namespaced: true, Kind: "Job", Group: "batch", Title: "Jobs"}, {Namespaced: true, Kind: "PersistentVolumeClaim", Group: "", Title: "PVCs"}, {Namespaced: true, Kind: "ConfigMap", Group: "", Title: "Configs"}, {Namespaced: true, Kind: "Secret", Group: "", Title: "Secrets"}, {Namespaced: true, Kind: "Service", Group: "", Title: "Services"}, {Namespaced: true, Kind: "Ingress", Group: "networking.k8s.io", Title: "Ingresses"}, {Namespaced: true, Kind: "ServiceAccount", Group: "", Title: "ServiceAccounts"}, } )
Functions ¶
This section is empty.
Types ¶
type GroupKindFunc ¶
type ResourceMenu ¶
type ResourceMenu struct { *listTable.ListTable sync.Mutex // contains filtered or unexported fields }
func NewResourcesMenu ¶
func NewResourcesMenu(workspace commander.Workspace, onSelect SelectFunc, selectNamespace func(), resourceProvider commander.ResourceProvider) (*ResourceMenu, error)
func (*ResourceMenu) ConfigUpdated ¶
func (r *ResourceMenu) ConfigUpdated(config *pb.Config)
func (*ResourceMenu) OnKeyPress ¶
func (*ResourceMenu) OnShow ¶
func (r *ResourceMenu) OnShow()
func (*ResourceMenu) SelectItem ¶
func (r *ResourceMenu) SelectItem(id string)
func (*ResourceMenu) UpdateMenu ¶
type WidgetConstructor ¶
Click to show internal directories.
Click to hide internal directories.