api

package
v0.1.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeFlags

type ConsumeFlags struct {
	Follow     bool
	Tail       int32
	OffsetFlag string
}

func DefaultConsumeFlags

func DefaultConsumeFlags() ConsumeFlags

type ConsumerGroup

type ConsumerGroup struct {
	Name      string
	State     string
	Consumers int
}

type KafkaDataSource

type KafkaDataSource interface {
	Init()
	GetTopics() ([]string, error)
	GetContexts() ([]string, error)
	GetContext() string
	SetContext(contextName string) error
	GetConsumerGroups() ([]ConsumerGroup, error)
	ConsumeTopic(ctx context.Context, topicName string, flags ConsumeFlags, handleMessage MessageHandlerFunc) error
}

type Message

type Message struct {
	Key    string
	Value  string
	Offset int64
}

type MessageHandlerFunc

type MessageHandlerFunc func(msg Message)

Jump to

Keyboard shortcuts

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