throwing

package
v0.0.0-...-59fcf8b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EscapeEventHandler = func(app *AppView) func(event *tcell.EventKey) *tcell.EventKey {
		return func(event *tcell.EventKey) *tcell.EventKey {
			if event.Key() == tcell.KeyEscape || event.Rune() == 'q' {
				app.showMenu = false
				app.SwitchPage(app.currentPage, app.tableViews[app.currentPage], app.tableViews[app.currentPage].actions)
			}
			return event
		}
	}
)

Functions

This section is empty.

Types

type AppView

type AppView struct {
	*tview.Flex
	*tview.Application
	types.Drawer
	// contains filtered or unexported fields
}

func NewAppView

func NewAppView(clientset *kubernetes.Clientset, dr types.Drawer, handler EventHandler, refreshSignals map[string]chan struct{}) *AppView

NewAppView takes 4 parameters:

Clientset: Kubernetes client
Drawer: Generic drawer to define how the table view looks like
Handler: Event handler
RefresherSignals: External Signal to trigger table refresh, mapped by resource kind

func (*AppView) CurrentPage

func (app *AppView) CurrentPage() tview.Primitive

func (*AppView) Init

func (app *AppView) Init() error

func (*AppView) LastPage

func (app *AppView) LastPage()

func (*AppView) SwitchPage

func (app *AppView) SwitchPage(page string, p tview.Primitive, actions []types.Action)

func (*AppView) SwitchToRootPage

func (app *AppView) SwitchToRootPage()

type EventHandler

type EventHandler func(t *TableView) func(event *tcell.EventKey) *tcell.EventKey

type PageTrack

type PageTrack struct {
	PageName string
	tview.Primitive
}

type PrimitiveQueue

type PrimitiveQueue struct {
	*AppView
	// contains filtered or unexported fields
}

func (*PrimitiveQueue) Dequeue

func (p *PrimitiveQueue) Dequeue() PageTrack

func (*PrimitiveQueue) Empty

func (p *PrimitiveQueue) Empty() bool

func (*PrimitiveQueue) Enqueue

func (p *PrimitiveQueue) Enqueue(t PageTrack)

func (*PrimitiveQueue) Last

func (p *PrimitiveQueue) Last() PageTrack

type TableView

type TableView struct {
	*tview.Table
	// contains filtered or unexported fields
}

func NewTableView

func NewTableView(app *AppView, kind string, drawer types.Drawer) *TableView

func (*TableView) BackPage

func (t *TableView) BackPage()

func (*TableView) GetAction

func (t *TableView) GetAction() []types.Action

func (*TableView) GetApplication

func (t *TableView) GetApplication() *tview.Application

func (*TableView) GetClientSet

func (t *TableView) GetClientSet() *kubernetes.Clientset

func (*TableView) GetCurrentPage

func (t *TableView) GetCurrentPage() string

func (*TableView) GetCurrentPrimitive

func (t *TableView) GetCurrentPrimitive() tview.Primitive

func (*TableView) GetNestedTable

func (t *TableView) GetNestedTable(kind string) *TableView

func (*TableView) GetResourceKind

func (t *TableView) GetResourceKind() string

func (*TableView) GetSelectionName

func (t *TableView) GetSelectionName() string

func (*TableView) GetTable

func (t *TableView) GetTable() *tview.Table

func (*TableView) GetTableView

func (t *TableView) GetTableView(kind string) *TableView

func (*TableView) InsertDialog

func (t *TableView) InsertDialog(name string, page tview.Primitive, dialog tview.Primitive)

func (*TableView) LastPage

func (t *TableView) LastPage()

func (*TableView) Navigate

func (t *TableView) Navigate(r rune)

func (*TableView) NewNestTableView

func (t *TableView) NewNestTableView(kind types.ResourceKind, feeder datafeeder.DataSource, actions []types.Action, pageNav map[rune]string, embeddedHandler EventHandler) *TableView

func (*TableView) Refresh

func (t *TableView) Refresh()

func (*TableView) RefreshManual

func (t *TableView) RefreshManual()

func (*TableView) RootPage

func (t *TableView) RootPage()

func (*TableView) SetCurrentPage

func (t *TableView) SetCurrentPage(page string)

func (*TableView) SetTableView

func (t *TableView) SetTableView(kind string, nt *TableView)

func (*TableView) ShowSearch

func (t *TableView) ShowSearch()

func (*TableView) SwitchPage

func (t *TableView) SwitchPage(page string, draw tview.Primitive)

func (*TableView) SwitchToRootPage

func (t *TableView) SwitchToRootPage()

func (*TableView) UpdateFeeder

func (t *TableView) UpdateFeeder(kind string, feeder datafeeder.DataSource)

func (*TableView) UpdateStatus

func (t *TableView) UpdateStatus(status string, isError bool) tview.Primitive

func (*TableView) UpdateWithSearch

func (t *TableView) UpdateWithSearch(search string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL