gatelineAPI reference

The engine surface runLoop actually drives, narrowed from the concrete Engine class (which the CLI and gateline up pass in) so tests can supply a fake without fighting Engine's private fields — an object literal can't structurally satisfy a class type carrying private state, but a real Engine instance satisfies this interface trivially.

interface EngineLike {
    onSettled: null | () => void;
    deferrals(): Deferral[];
    drain(): Promise<void>;
    inFlight(): number;
    pushHealth(): ReadonlyMap<string, number>;
    syncFromRemote(): Promise<void>;
    tick(): Promise<TickOutcome[]>;
}

Properties

onSettled: null | () => void

Methods