iokafka

package module
v0.0.0-...-203cb79 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaMessage

type KafkaMessage kafka.Message

func (KafkaMessage) ToMessage

func (m KafkaMessage) ToMessage() Message

type Message

type Message struct {
	Topic     string
	Partition int
	Offset    int64
	Key       []byte
	Value     []byte
}

func (Message) ToKafkaMessage

func (m Message) ToKafkaMessage() kafka.Message

type Scanner

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

func NewScanner

func NewScanner(config ScannerConfig) Scanner

func (*Scanner) Err

func (s *Scanner) Err() error

func (*Scanner) Message

func (s *Scanner) Message() Message

func (*Scanner) Scan

func (s *Scanner) Scan() bool

type ScannerConfig

type ScannerConfig struct {
	Brokers       []string
	GroupID       string
	Partition     int
	Topic         string
	AttemtsOnFail int
	FailTimeout   int
	StartOffset   int64
}

type Writer

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

func NewWriter

func NewWriter(brokerUrl string, topic string) *Writer

func (*Writer) Close

func (w *Writer) Close() (err error)

func (*Writer) Write

func (w *Writer) Write(msg Message) (err error)

Jump to

Keyboard shortcuts

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