Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer interface {
Messages() <-chan *sarama.ConsumerMessage
Errors() <-chan error
Notifications() <-chan *cluster.Notification
}
Consumer is the interface for a Kafka consumer By using an interface that matches bsm/sarama-cluster instead of passing in an instance, testing is made easy
type Decoder ¶
type Decoder interface {
// ValidateSchemas takes in the path(s) to schema files
// and returns an error if the schemas are invalid. If
// schemas are not required by the decoder implementation
// return nil
ValidateSchemas(schemas string) error
// Decode takes in a Kafka message value and returns an interface{}
// which can be read by json.Marshal() and an error
Decode([]byte) (interface{}, error)
}
Decoder is the interface used by go-kafka-consumer to decode kafka messages into printable interfaces
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser consumes from a Kafka topic, calls message decoders, and prints the message to the console in JSON format
Click to show internal directories.
Click to hide internal directories.