If present, indicates the operation failed.
If present and err is not present, the return value from the operation.
Async function that you write that takes the current state R and returns an array of data tpye T
Defines an event used in through operations.
The payload of the event.
This returns a function that you call to create an instance of the RStreams SDK.
The SDK is usually smart enough to find the config it needs or you can pass it in directly here.
The SDK instance itself.
This creates an async/await-friendly pipeline step that will take data in, possibly transform the data or do computation, and then sends the result on to the next step in the pipeline.
The type of the data sent in to be passed through this step.
The type of data to be sent on to the next step in the pipeline.
A function that does the work of taking the data in, doing something with it and then rejecting or resolving
the promise with the result object type U. If you resolve with no result data, the event is skipped and not sent to the next pipeline step.
The first arg is stripped off by Javascript since it recognizes that the this arg is just to set the this context
so that the this
keyword will work inside the function and itself be the instance of the transform stream which can be useful.
For example, say you want to push to an event in here to a queue. You could do that by calling
this.push
to push the event to a queue while still sending the queue on the next step in the pipeline afterwards.
So, the first real argument your function will receive is obj
which is the data event being sent in to be processed/transformed
and sent on to the next pipeline step.
A function to be called when the entire pipeline has been flushed to allow for cleanup, perhaps closing a DB connection.
The pipeline step that is ready to be used in a pipeline
Generated using TypeDoc
A standard callback function. If the operation failed, return the first argument only, often a string or an Error object. If the operation succeeded and nothing needs to be returned from the callback, pass no arguments. If the operation succeeded and something needs to be returned through the callback, pass null as the first argument and the return object as the second argument.