kafka

package
v1.1.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKafka

func NewKafka(l logger.Logger) pubsub.PubSub

NewKafka returns a new kafka pubsub instance

Types

type Kafka

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

Kafka allows reading/writing to a Kafka consumer group

func (*Kafka) Close added in v1.0.0

func (k *Kafka) Close() error

func (*Kafka) Features added in v1.0.0

func (k *Kafka) Features() []pubsub.Feature

func (*Kafka) Init

func (k *Kafka) Init(metadata pubsub.Metadata) error

Init does metadata parsing and connection establishment

func (*Kafka) Publish

func (k *Kafka) Publish(req *pubsub.PublishRequest) error

Publish message to Kafka cluster

func (*Kafka) Subscribe

func (k *Kafka) Subscribe(req pubsub.SubscribeRequest, handler func(msg *pubsub.NewMessage) error) error

Subscribe to topic in the Kafka cluster This call cannot block like its sibling in bindings/kafka because of where this is invoked in runtime.go

Jump to

Keyboard shortcuts

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