kafka

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Factory = FactoryType{}

Functions

func InitTopic

func InitTopic(bootstrapUrl string, topics ...string) (err error)

func NewConsumer

func NewConsumer(ctx context.Context, config config.Config, topic string, listener func(delivery []byte) error) error

func NewProducer

func NewProducer(ctx context.Context, config config.Config, topic string) (interfaces.Producer, error)

Types

type FactoryType

type FactoryType struct{}

func (FactoryType) NewConsumer

func (FactoryType) NewConsumer(ctx context.Context, config config.Config, topic string, listener func(delivery []byte) error) error

func (FactoryType) NewProducer

func (FactoryType) NewProducer(ctx context.Context, config config.Config, topic string) (interfaces.Producer, error)

type Producer

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

func (*Producer) Produce

func (this *Producer) Produce(key string, message []byte) error

Jump to

Keyboard shortcuts

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