kafui

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains[T comparable](s []T, e T) bool

https://stackoverflow.com/a/70802740

func CreateMainPage

func CreateMainPage(dataSource api.KafkaDataSource, pages *tview.Pages, app *tview.Application, modal *tview.Modal, msgChannel chan UIEvent) *tview.Flex

func CreateSearchInput

func CreateSearchInput(table *tview.Table, dataSource api.KafkaDataSource, pages *tview.Pages, app *tview.Application, modal *tview.Modal) *tview.InputField

func Init

func Init(useMock bool)

func OpenUI

func OpenUI(dataSource api.KafkaDataSource)

func SetupTableInput

func SetupTableInput(table *tview.Table, app *tview.Application, pages *tview.Pages, dataSource api.KafkaDataSource, msgChannel chan UIEvent)

func ShowNotification

func ShowNotification(message string)

func UpdateTable

func UpdateTable(table *tview.Table, dataSource api.KafkaDataSource)

Types

type DetailPage

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

func NewDetailPage

func NewDetailPage(app *tview.Application, pages *tview.Pages, value string) *DetailPage

func (*DetailPage) Hide

func (vp *DetailPage) Hide()

Hide hides the page.

func (*DetailPage) Show

func (vp *DetailPage) Show()

type ResouceName

type ResouceName []string // array because it can have multiple names
var (
	Context       ResouceName = []string{"context", "ctx", "kafka", "broker"}
	Topic         ResouceName = []string{"topics", "ts"}
	ConsumerGroup ResouceName = []string{"consumergroups", "groups", "consumers", "cgs"}
)

type SearchMode

type SearchMode string
const (
	TableSearch   SearchMode = "TableSearch"
	ResouceSearch SearchMode = "ResouceSearch"
)

type TopicPage

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

func NewTopicPage

func NewTopicPage(dataSource api.KafkaDataSource, pages *tview.Pages, app *tview.Application, msgChannel chan UIEvent) *TopicPage

func (*TopicPage) CloseTopicPage

func (tp *TopicPage) CloseTopicPage()

func (*TopicPage) CreateTopicPage

func (tp *TopicPage) CreateTopicPage(currentTopic string) *tview.Flex

func (*TopicPage) PageConsumeTopic

func (tp *TopicPage) PageConsumeTopic(currentTopic string)

type UIEvent

type UIEvent string
const (
	OnModalClose       UIEvent = "ModalClose"
	OnFocusSearch      UIEvent = "FocusSearch"
	OnStartTableSearch UIEvent = "OnStartTableSearch"
	OnPageChange       UIEvent = "PageChange"
)

Jump to

Keyboard shortcuts

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