Skip to main content

wrapCallback

Stentor API Reference


Stentor API Reference / stentor-service-event/src / wrapCallback

Function: wrapCallback()

wrapCallback(event, lambdaCallback): RuntimeCallback

Defined in: packages/stentor-service-event/src/EventService.ts:294

This function will wrap the callback to allow flushing the events to the streams just before the callback is sent to the real one.

Parameters​

event​

EventService

The event service to flush when the callback is called.

lambdaCallback​

RuntimeCallback

The original callback to wrap

Returns​

RuntimeCallback

A new Lambda callback that can be used in replace of the original