djafka

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const CANCEL = "ctrl+c"
View Source
const ConnectionsLabel = "Connections"

Menu and Table Labels

View Source
const ConsumerGroupsLabel = "Consumer Groups"
View Source
const ConsumerIdLabel = "ConsumerId"
View Source
const ConsumersLabel = "Consumers"
View Source
const DetailsLabel = "Details"
View Source
const ESC = "esc"
View Source
const GroupIdLabel = "GroupId"
View Source
const InfoLabel = "Info"
View Source
const MenuLabel = "Menu"
View Source
const QUIT = "q"
View Source
const ResultLabel = "Result"
View Source
const StateLabel = "State"
View Source
const TAB = "tab"
View Source
const TopicsLabel = "Topics"

Variables

This section is empty.

Functions

func Run

func Run()

Types

type AddTopicCancel

type AddTopicCancel struct{}

type AddTopicPrompt

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

func InitialAddTopicPrompt

func InitialAddTopicPrompt(log *log.Logger) AddTopicPrompt

func (AddTopicPrompt) Init

func (m AddTopicPrompt) Init() tea.Cmd

func (AddTopicPrompt) Update

func (m AddTopicPrompt) Update(msg tea.Msg) (AddTopicPrompt, tea.Cmd)

func (AddTopicPrompt) View

func (m AddTopicPrompt) View() string

type AddTopicSubmitMsg

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

type ClientConnectedMsg

type ClientConnectedMsg struct{}

type Config

type Config struct {
	Connections []Connection `json:"connections"`
}

func ReadConfig

func ReadConfig() (*Config, error)

func (*Config) FindConnection

func (c *Config) FindConnection(name string) (Connection, error)

type Connection

type Connection struct {
	Name            string `json:"name"`
	BootstrapServer string `json:"bootstrapServer"`
}

type ConnectionChangedMsg

type ConnectionChangedMsg Connection

type ConnectionComponent

type ConnectionComponent struct {
	table.Model
	// contains filtered or unexported fields
}

func (ConnectionComponent) Update

type Consumer

type Consumer struct {
	GroupId         string
	ConsumerId      string
	State           string
	TopicPartitions []ConsumerTopicPartition
}

type ConsumerSelectedMsg

type ConsumerSelectedMsg Consumer

type ConsumerTopicPartition

type ConsumerTopicPartition struct {
	TopicName string
	Offset    string
	Partition int32
}

type ConsumersLoadedMsg

type ConsumersLoadedMsg []Consumer

type ConsumersSelectedMsg

type ConsumersSelectedMsg struct{}

type DataProvider

type DataProvider interface {
	ListTopics() ([]string, error)
	ListConsumerGroups() ([]string, error)
	ListConsumers(groupIds []string) ([]Consumer, error)
}

type DetailsComponent

type DetailsComponent struct {
	table.Model
}

func (*DetailsComponent) SetConsumerDetails

func (c *DetailsComponent) SetConsumerDetails(item Consumer)

func (*DetailsComponent) SetTopicDetails

func (c *DetailsComponent) SetTopicDetails(item TopicConfig)

func (DetailsComponent) Update

func (c DetailsComponent) Update(msg tea.Msg) (DetailsComponent, tea.Cmd)

type ErrorComponent

type ErrorComponent struct {
	Message string
	Width   int
	Height  int
}

func (ErrorComponent) Update

func (c ErrorComponent) Update(msg tea.Msg) (ErrorComponent, tea.Cmd)

func (ErrorComponent) View

func (c ErrorComponent) View() string

type ErrorMsg

type ErrorMsg error

type HelpComponent

type HelpComponent struct {
	help.Model
	// contains filtered or unexported fields
}

func (HelpComponent) FullHelp

func (k HelpComponent) FullHelp() [][]key.Binding

func (HelpComponent) ShortHelp

func (k HelpComponent) ShortHelp() []key.Binding

func (HelpComponent) Update

func (c HelpComponent) Update(msg tea.Msg) (HelpComponent, tea.Cmd)

type InfoComponent

type InfoComponent struct {
	viewport.Model
}

func NewInfoComponent

func NewInfoComponent() (InfoComponent, error)

func (InfoComponent) Update

func (c InfoComponent) Update(msg tea.Msg) (InfoComponent, tea.Cmd)

func (InfoComponent) View

func (c InfoComponent) View() string

type InfoSelectedMsg

type InfoSelectedMsg struct{}
type Menu struct {
	table.Model
}
func (m *Menu) IsInfoSelected() bool
func (m Menu) Update(msg tea.Msg) (Menu, tea.Cmd)

type ResetMsg

type ResetMsg struct{}

type ResultComponent

type ResultComponent struct {
	table.Model
	// contains filtered or unexported fields
}

func (*ResultComponent) SetConsumers

func (c *ResultComponent) SetConsumers(items []Consumer)

func (*ResultComponent) SetTopics

func (c *ResultComponent) SetTopics(items []Topic)

func (ResultComponent) Update

func (c ResultComponent) Update(msg tea.Msg) (ResultComponent, tea.Cmd)

type Service

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

func NewService

func NewService(conn Connection, logger *log.Logger) (*Service, error)

func (*Service) Close

func (s *Service) Close()

func (*Service) CreateTopic

func (s *Service) CreateTopic(name string, partitions int, replicationFactor int) (Topic, error)

func (*Service) FetchMessages

func (s *Service) FetchMessages(topic string, channel chan string) error

func (*Service) GetTopicConfig

func (s *Service) GetTopicConfig(name string) (TopicConfig, error)

func (*Service) GetTopicMetadata

func (s *Service) GetTopicMetadata(topic string) (kafka.TopicMetadata, error)

func (*Service) ListConsumerGroups

func (s *Service) ListConsumerGroups() ([]string, error)

func (*Service) ListConsumers

func (s *Service) ListConsumers(groupIds []string) ([]Consumer, error)

func (*Service) ListTopics

func (s *Service) ListTopics() ([]Topic, error)

func (*Service) ResetConsumerOffsets

func (s *Service) ResetConsumerOffsets(group string, topic string, offset int64) error

type StartupComponent

type StartupComponent struct {
	progress.Model
	Width  int
	Height int
}

func NewStartupComponent

func NewStartupComponent() (StartupComponent, tea.Cmd)

func (*StartupComponent) Initialized

func (c *StartupComponent) Initialized() bool

func (StartupComponent) Update

func (c StartupComponent) Update(msg tea.Msg) (StartupComponent, tea.Cmd)

func (StartupComponent) View

func (c StartupComponent) View() string

type TickMsg

type TickMsg struct{}

type Topic

type Topic struct {
	Name           string
	PartitionCount int
}

type TopicConfig

type TopicConfig struct {
	Name     string
	Settings map[string]string
}

type TopicSelectedMsg

type TopicSelectedMsg Topic

type TopicSettingsLoadedMsg

type TopicSettingsLoadedMsg TopicConfig

type TopicsLoadedMsg

type TopicsLoadedMsg []Topic

type TopicsSelectedMsg

type TopicsSelectedMsg struct{}

Jump to

Keyboard shortcuts

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