kafka

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 2 Imported by: 0

README

go-kafka

Wrapper around Sarama library for simple use cases

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncProducer

type AsyncProducer interface {
	Send(message *Message)
	Errors() <-chan error
	Close() error
}

func NewAsyncProducer

func NewAsyncProducer(opts *ProducerOptions, config *sarama.Config) (AsyncProducer, error)

type Consumer

type Consumer interface {
	Receive() <-chan *Message
	Errors() <-chan error
	Close() error
}

func NewConsumer

func NewConsumer(opts *ConsumerOptions, config *sarama.Config) (Consumer, error)

type ConsumerOptions

type ConsumerOptions struct {
	Topic      string
	Brokers    []string
	BufferSize int
	GroupName  string
}

type Message

type Message struct {
	Key   []byte
	Value []byte
}

type ProducerOptions

type ProducerOptions struct {
	Topic      string
	Brokers    []string
	BufferSize int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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