kafka

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 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 {
	Addrs    string
	Topic    string
	GroupId  string
	WarnTime time.Duration
}

type Consumer

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

func NewConsumer

func NewConsumer(ctx contextx.Context, opfs ...func(cfg *Config)) (*Consumer, error)

func (*Consumer) Cleanup

func (c *Consumer) Cleanup(assignment sarama.ConsumerGroupSession) error

func (*Consumer) ConsumeClaim

func (c *Consumer) ConsumeClaim(assignment sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

func (*Consumer) OnMessageHandler

func (c *Consumer) OnMessageHandler(f func(data []byte))

func (*Consumer) Setup

func (c *Consumer) Setup(assignment sarama.ConsumerGroupSession) error

type Producer

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

func NewProducer

func NewProducer(g contextx.Context, opfs ...func(cfg *Config)) (*Producer, error)

func (*Producer) Push

func (p *Producer) Push(data []byte) error

Jump to

Keyboard shortcuts

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