httpSink
function httpSink(options): AuditSink;Defined in: src/sinks/http.ts:67
Create a generic HTTP sink.
Delivery is at-least-once: a batch can arrive again after a timeout or a
crash between the 2xx and the cursor write. Receivers dedupe on
item.event.id / item.checkpoint.id.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
HttpSinkOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createStreamRunner } from "@xtandard/audit";import { httpSink } from "@xtandard/audit/sinks/http";
createStreamRunner(audit, { streams: [ { name: "siem", sink: httpSink({ url: "https://siem.example.com/ingest", headers: { authorization: `Bearer ${process.env.SIEM_TOKEN}` }, format: "ndjson", }), }, ],}).start();