watcher

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	*kgo.Record
}

type Watcher

type Watcher struct {
	// Ensure Client is closed to preserve proper state in partitions
	//
	// defer watcher.Client.Close()
	Client *kgo.Client
	// contains filtered or unexported fields
}

func New

func New(brokers, topics []string, consumerGroup string) (*Watcher, error)

New returns a new Watcher

func (*Watcher) ConsumeRecords

func (w *Watcher) ConsumeRecords(matches func(message *message.Message) bool)

ConsumeRecords returns matches of record results

func (*Watcher) StartTaskHandler

func (w *Watcher) StartTaskHandler(taskHandler func(*message.Message) error)

StartTaskHandler returns nil

Jump to

Keyboard shortcuts

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