kafka

package
v1.19.47 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kafka

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

func (*Kafka) Check

func (k *Kafka) Check() error

func (*Kafka) Close

func (k *Kafka) Close()

func (*Kafka) CreateTopic

func (k *Kafka) CreateTopic(topic string) error

func (*Kafka) GetAdminClient

func (k *Kafka) GetAdminClient() (sarama.ClusterAdmin, error)

func (*Kafka) GetConsumer

func (k *Kafka) GetConsumer() (sarama.Consumer, error)

func (*Kafka) GetConsumerGroup

func (k *Kafka) GetConsumerGroup(id string) (sarama.ConsumerGroup, error)

func (*Kafka) GetProducer

func (k *Kafka) GetProducer() (sarama.AsyncProducer, error)

func (*Kafka) Init

func (k *Kafka) Init(kafkaConfigUrl string)

func (*Kafka) MessageListener

func (k *Kafka) MessageListener(groupId, topic string, listener func(msg string) error) error

func (*Kafka) Send

func (k *Kafka) Send(topic, data string) error

func (*Kafka) SendMsgs

func (k *Kafka) SendMsgs(topic string, data []string) error

type MsgHandler

type MsgHandler struct {
	Handle func(msg string) error
}

func (MsgHandler) Cleanup

func (MsgHandler) ConsumeClaim

func (MsgHandler) Setup

Jump to

Keyboard shortcuts

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