eventbus

package
v0.0.0-...-e3cb19e Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Brokers []string
}

type Consumer

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

func (*Consumer) Consume

func (c *Consumer) Consume(ctx context.Context)

type ConsumerHandlerI

type ConsumerHandlerI interface {
	Handle(b kafka.Message) bool
}

type ConsumerI

type ConsumerI interface {
	Consume(ctx context.Context)
}

func NewConsumer

func NewConsumer(brokers []string, servName, topic string, startOff int64, h ConsumerHandlerI) ConsumerI

type Model

type Model interface {
	ToMessage() kafka.Message
}

type Producer

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

func (*Producer) Produce

func (p *Producer) Produce(ctx context.Context, m Model) error

type ProducerI

type ProducerI interface {
	Produce(ctx context.Context, m Model) error
}

func NewProducer

func NewProducer(brokers []string, topic string, batchSize int) ProducerI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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