kafui

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 17 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 CopySelectedRowToClipboard

func CopySelectedRowToClipboard(table *tview.Table, ConsumeMessage func(message string))

Function to copy the selected row of the table to the clipboard in CSV format

func CreateMainInputLegend

func CreateMainInputLegend() *tview.Flex

func CreateMainPage

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

func CreatePropertyInfo

func CreatePropertyInfo(propertyName string, propertyValue string) *tview.InputField

func CreateRunInfo

func CreateRunInfo(runeName string, info string) *tview.InputField

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 ByOffsetThenPartition

type ByOffsetThenPartition []api.Message

Implement the sort.Interface

func (ByOffsetThenPartition) Len

func (a ByOffsetThenPartition) Len() int

func (ByOffsetThenPartition) Less

func (a ByOffsetThenPartition) Less(i, j int) bool

func (ByOffsetThenPartition) Swap

func (a ByOffsetThenPartition) Swap(i, j int)

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) CreateInputLegend

func (vp *DetailPage) CreateInputLegend() *tview.Flex

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) CreateConsumeFlagsSection

func (tp *TopicPage) CreateConsumeFlagsSection() *tview.Flex

func (*TopicPage) CreateInputLegend

func (tp *TopicPage) CreateInputLegend() *tview.Flex

func (*TopicPage) CreateInputSearch

func (tp *TopicPage) CreateInputSearch(onDone func()) *tview.Flex

func (*TopicPage) CreateTopicInfoSection

func (tp *TopicPage) CreateTopicInfoSection(topicName string, topicDetail api.Topic) *tview.Flex

func (*TopicPage) CreateTopicPage

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

func (*TopicPage) PageConsumeTopic

func (tp *TopicPage) PageConsumeTopic(topicName string, currentTopic api.Topic, flags api.ConsumeFlags)

func (*TopicPage) RestartConsumer

func (tp *TopicPage) RestartConsumer()

func (*TopicPage) ShowNotification

func (tp *TopicPage) ShowNotification(message 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