kafka

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaReader

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

func NewKafkaReader

func NewKafkaReader(config KafkaReaderConfig) (*KafkaReader, error)

func (*KafkaReader) Close

func (kr *KafkaReader) Close() error

func (*KafkaReader) Read

func (kr *KafkaReader) Read() ([]byte, error)

type KafkaReaderConfig

type KafkaReaderConfig struct {
	Brokers       []string
	GroupId       string
	Topic         string
	QueueCapacity int
	MinBytes      int
	MaxBytes      int
}

type KafkaWritter

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

func NewKafkaWritter

func NewKafkaWritter(config KafkaWritterConfig) (*KafkaWritter, error)

func (*KafkaWritter) Close

func (kw *KafkaWritter) Close() error

func (*KafkaWritter) Write

func (kw *KafkaWritter) Write(msgs []Message)

type KafkaWritterConfig

type KafkaWritterConfig struct {
	Brokers      []string
	Topic        string
	MaxAttempts  int
	BatchSize    int
	BatchTimeout time.Duration
	WriteTimeout time.Duration
	LogFileName  string
}

type Message

type Message []byte

Jump to

Keyboard shortcuts

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