Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNilChan error = fmt.Errorf("Source channel is nil")
ErrNilChan indicates that the FilePublisher has no source channel
Functions ¶
Types ¶
type ConnectionOpts ¶
ConnectionOpts wrap the information needed to connect to kafka
type PrometheusCollector ¶
type PrometheusCollector struct {
Publisher *Publisher
}
PrometheusCollector reports stats from the kafka client to Prometheus
func (PrometheusCollector) Collect ¶
func (k PrometheusCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the Collector's Collect method
func (PrometheusCollector) Describe ¶
func (k PrometheusCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the Collector's Describe method
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher reads Events and writes them to disk
func (*Publisher) GetResumeID ¶
GetResumeID will try to get the latest message published to Kafka and extract a resume ID from it
func (*Publisher) ProcessEvent ¶
ProcessEvent writes a single event to a kafka
func (*Publisher) ReadAndPublish ¶
ReadAndPublish will read Events from the input channel and write them to the kafka topic configured for this Publisher.
Calling ReadAndPublish() will reset the processed message counter of the underlying Publisher and returns the value of the counter when the Publisher's source channel is closed
func (*Publisher) ValidateConnection ¶
ValidateConnection tests the connection to Kafka using the details given when creating the Publisher