kafka

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Brokers     []string
	Topic       string
	Group       string
	Partition   int
	StartOffset int64
}

type EasyKafka

type EasyKafka struct {
	Logf func(string, ...interface{})
	// contains filtered or unexported fields
}

func NewEasyKafka

func NewEasyKafka(xLog *xlog.XLog) *EasyKafka

func NewEasyKafka2 added in v0.5.1

func NewEasyKafka2(xLog *logrus.Entry) *EasyKafka

func (*EasyKafka) Read

func (easy *EasyKafka) Read(c *Config, ch chan *kafka.Message, ctx context.Context)

func (*EasyKafka) Write

func (easy *EasyKafka) Write(c Config, ch chan []*kafka.Message, resp func([]*kafka.Message), ctx context.Context)

func (*EasyKafka) WriteBatch

func (easy *EasyKafka) WriteBatch(c *Config, ch chan []*kafka.Message, resp func([]*kafka.Message), parent context.Context, count int)

Jump to

Keyboard shortcuts

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