pods

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model for pods. Mutex is necessary here. We must synchronize UpdateList function call and View function call on update namespaces. In order to make user interface faster on update namespace we call update callbacks in another goroutine. namespaces/model.go package Model.setActive() function has go m.app.OnUpdateNamespace() If user switch tab faster than k8s makes call to update list, user will get outdated list. Mutex helps us to wait for k8s response and update list before view.

func New

func New(app *shared.App, repo podsRepo) (*Model, error)

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) UpdateList

func (m *Model) UpdateList()

func (*Model) View

func (m *Model) View() string

Jump to

Keyboard shortcuts

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