inngest
Version:
Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.
42 lines (40 loc) • 1.19 kB
TypeScript
import { OutgoingOp } from "../../types.js";
//#region src/components/execution/lazyOps.d.ts
/**
* Buffer for opcode-only sync ops (e.g. `DeferAdd`). These ops need to be
* buffered until the next outbound wire message (e.g. checkpointing a
* `step.run`).
*
* The engine owns shipping. This helper owns the buffer.
*/
declare class LazyOps {
private buffer;
private pushedIds;
/**
* Number of ops waiting to ship.
*/
get length(): number;
/**
* Whether an op with this hashed id has been pushed in this execution
* (whether or not it has since been drained).
*/
hasId(id: string): boolean;
/**
* Take ownership of buffered ops and clear the buffer. Callers ship them on
* whichever wire message comes next.
*/
drain(): OutgoingOp[];
/**
* Buffer an op for later shipment.
*/
push(op: OutgoingOp): void;
/**
* Record that an id has been observed in this execution without buffering
* an op for it. Used to consume a `priorDefers` replay match so that
* subsequent encounters of the same id surface as duplicates.
*/
markSeen(id: string): void;
}
//#endregion
export { LazyOps };
//# sourceMappingURL=lazyOps.d.ts.map