Your registered config data that will be mixed in with the event when sent to you
The type of the data to be returned from the operation, if any
The type of the Error object if the operation fails
A standard callback function supporting operation success with optional data returned and fail with Error.
// Operation failed, returns an error from the callback
callback(new Error())
// Operation succeeded, return data from this operation
callback(null, data)
// Operation succeeded but don't want to forward any data from this operation
callback()
If present, the operation failed and this is the error
If present, this is the data to return from the operation
A standard callback indicating the operation failed if error is present
If present, an error occurred and this is it
The type of an error, if there is one
This is a flush event callback function. When a stream is closed, the pipe is flushed meaning all events flow out of
the pipe until it's empty. Once it's empty, the FlushCallabck
will be called, allowing the developer to do cleanup
like close open database connections or whatever.
Node will consume this argument and use it to set the context of the function to be the TransformStream
itself
so you can call methods on this
in the function which will be the TransformStream
instance
The function to call when the flush is complete
The type of data to be sent into the pipe step
The type of data that will be produced by this pipe step and sent to the next pipe step
The type of error produced if something goes wrong
Creates a TransformStream
pipe step. The doc on TransformStream
is very helpful.
Node will consume this argument and use it to set the context of the function to be the TransformStream
itself
so you can call methods on this
in the function which will be the TransformStream
instance
A standard callback to return an error or data to send to the next pipe step
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
The RStreams bus will create this event and pass it to your bot when it is invoked. It tells you the ID of the bot your code is running as, so you don't have to hard-code it or so you can do complex things with fanout. It also sends you detail on the bot itself, including checkpoints and so on. Finally, the event will include your own custom-defined config you registered that you wanted passed into your bot when invoked.