Skip to content

createStreamRunner

function createStreamRunner<A>(core, options): StreamRunner;

Defined in: src/streams.ts:141

Create a stream runner over a core. The panel creates and starts one when given streams; call start() yourself otherwise (timers are unrefed).

Type Parameter
A extends ActionMap
Parameter Type
core AuditCore<A>
options StreamRunnerOptions

StreamRunner

import { createStreamRunner } from "@xtandard/audit";
import { httpSink } from "@xtandard/audit/sinks/http";
const runner = createStreamRunner(audit, {
streams: [{ name: "siem", sink: httpSink({ url: "https://siem.example/ingest" }) }],
});
runner.start();