Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerInfo ¶
type KafkaConnector ¶
type KafkaConnector struct { Brokers []string Config sarama.Config Producers map[string]sarama.SyncProducer Consumers map[string][]ConsumerInfo }
func NewKafkaConnector ¶
func NewKafkaConnector(brokers []string) *KafkaConnector
func (*KafkaConnector) NewConsumer ¶
func (c *KafkaConnector) NewConsumer(topic string, partition int32, onMessage func(data []byte))
func (*KafkaConnector) NewProducer ¶
func (c *KafkaConnector) NewProducer(topic string) (*sarama.SyncProducer, error)
func (*KafkaConnector) TerminateConsumer ¶
func (c *KafkaConnector) TerminateConsumer(topic string, partition int32)
Click to show internal directories.
Click to hide internal directories.