createDispatcher
function createDispatcher(core, options?): Dispatcher;Defined in: src/dispatcher.ts:98
Create a dispatcher over a core. Not started — call Dispatcher.start, or drive Dispatcher.tick manually.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
core |
WebhooksCore |
options? |
DispatcherOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createWebhooksCore, createDispatcher } from "@xtandard/webhooks";import { createMemoryStorage } from "@xtandard/webhooks/storage/memory";
const core = createWebhooksCore({ storage: createMemoryStorage() });const dispatcher = createDispatcher(core);dispatcher.start();