prometheus-pushgw-kafka-connect
Version:
kafka-connect connector for prometheus pushgateway
29 lines (19 loc) • 533 B
JavaScript
;
const { SinkConnector } = require("kafka-connect");
const PushgatewayClient = require("./../prometheus/PushgatewayClient.js");
class PrometheusSinkConnector extends SinkConnector {
start(properties = {}, callback) {
this.client = new PushgatewayClient(properties.options);
callback();
}
taskConfigs(maxTasks, callback) {
callback(null, {
maxTasks,
client: this.client
});
}
stop() {
// empty
}
}
module.exports = PrometheusSinkConnector;