kafka

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader reads data from kafka topic

func NewReader

func NewReader(stopChannel <-chan os.Signal) (*Reader, error)

NewReader creates Kafka reader

func (*Reader) Close

func (sp *Reader) Close()

Close closes reader

func (*Reader) Commit

func (sp *Reader) Commit(msg *kafkaapi.Msg) error

Commit commit messages offset

func (*Reader) Get

func (sp *Reader) Get() (*kafkaapi.Msg, error)

Get reads a next message from kafka topic

type Writer

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

Writer writes messages to Kafka topic

func NewWriter

func NewWriter() (*Writer, error)

NewWriter creates Kafka writer

func (*Writer) Write

func (sp *Writer) Write(msg *kafkaapi.ResponseMsg) error

Write writes msg to Kafka

Jump to

Keyboard shortcuts

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