Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConf ¶ added in v0.9.18
ValidateConf validates supplied configuration
Types ¶
type Client ¶ added in v0.9.18
type Client interface { NewProducer(Common) (Producer, error) NewConsumer(Common) (Consumer, error) Brokers() []*sarama.Broker }
Client is the kafka client
type Common ¶ added in v0.9.18
type Common interface { ValidateConf() error Start() error Conf() conf.KafkaConf Producer() Producer }
Common is the base interface for bridges that interact with Kafka
func NewKafkaCommon ¶
func NewKafkaCommon(kf Factory, conf conf.KafkaConf, kafkaGoRoutines GoRoutines) (k Common)
NewKafkaCommon constructs a new Common instance
type Consumer ¶ added in v0.9.18
type Consumer interface { Close() error Messages() <-chan *sarama.ConsumerMessage Errors() <-chan error MarkOffset(*sarama.ConsumerMessage, string) }
Consumer provides the interface passed from KafkaCommon to consume messages
type GoRoutines ¶ added in v0.9.18
type GoRoutines interface { ConsumerMessagesLoop(consumer Consumer, producer Producer, wg *sync.WaitGroup) ProducerErrorLoop(consumer Consumer, producer Producer, wg *sync.WaitGroup) ProducerSuccessLoop(consumer Consumer, producer Producer, wg *sync.WaitGroup) }
GoRoutines defines goroutines for processing Kafka messages from KafkaCommon
type Producer ¶ added in v0.9.18
type Producer interface { AsyncClose() Input() chan<- *sarama.ProducerMessage Successes() <-chan *sarama.ProducerMessage Errors() <-chan *sarama.ProducerError }
Producer provides the interface passed from KafkaCommon to produce messages (subset of sarama)
Click to show internal directories.
Click to hide internal directories.