kafka

package
v0.0.0-...-3d3f4ff Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig() *config

func NewConnection

func NewConnection(c *config) (*kafka.Conn, error)

func WriteOnce

func WriteOnce(topic string, key, value []byte) error

Types

type Reader

type Reader interface {
	Topic() string
	ReadLag() (totalLag int64, err error)
	ReadAll(stoppable bool, fn func([]byte))
	Shutdown()
}

func NewReader

func NewReader(topic string) (Reader, error)

type Writer

type Writer interface {
	Topic() string
	Write(key []byte, value []byte) error
	Shutdown()
}

func NewWriter

func NewWriter(topic string) (Writer, error)

Jump to

Keyboard shortcuts

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