kafka-observe
Advanced tools
Comparing version 2.1.1-beta-14 to 2.1.1-beta-15
{ | ||
"name": "kafka-observe", | ||
"version": "2.1.1-beta-14", | ||
"version": "2.1.1-beta-15", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -126,2 +126,18 @@ # kafka-observe | ||
## streamReader | ||
Helper to convert consumed stream data to json object. needs to be initialized and returns a function that can be used to read the consumed data parts | ||
```javascript | ||
const { streamReader } = require("kafka-observe")(options); | ||
const _streamReader = streamReader(); | ||
_streamReader({ | ||
event: {}, | ||
id: "uniqueId", | ||
onStatus: (status) => console.log(status) // A callback to receive status about the stream | ||
}).then((event) => { | ||
// do something with the event | ||
}); | ||
``` | ||
## streamCallback | ||
@@ -128,0 +144,0 @@ |
const { expect } = require("chai"); | ||
const { timerHelpers } = require("../helpers"); | ||
const { timerHelpers } = require("../../../helpers"); | ||
@@ -5,0 +5,0 @@ describe("Timer helpers", function () { |
34724
199