Interface: SyncEngine
Defined in: contract.ts:145
@rasd/sync — the public entry point.
Two things ship here: the engine (createSyncEngine), which is transport
agnostic and drives @rasd/storage's outbox, and the RSP v1 transport
(createRspTransport), which is one implementation of the frozen
SyncTransport port. A host talking to ODK Central, KoboToolbox or its own
backend replaces the second without touching the first
(docs/10-sync-protocol.md §10).
Nothing in this file has an implementation; every symbol is re-exported from
the module that owns it, so the graph stays a DAG:
contract → types → policy / backoff / classify → idempotency →
rsp-transport → engine.
Methods
dispose()
dispose(): void;
Defined in: contract.ts:155
Returns
void
getStatus()
getStatus(): SyncStatus;
Defined in: contract.ts:146
Returns
on()
on<E>(event, handler): Unsubscribe;
Defined in: contract.ts:154
Type Parameters
| Type Parameter |
|---|
E extends keyof SyncEvents |
Parameters
| Parameter | Type |
|---|---|
event | E |
handler | (e) => void |
Returns
pause()
pause(): void;
Defined in: contract.ts:149
Returns
void
resume()
resume(): void;
Defined in: contract.ts:150
Returns
void
start()
start(): void;
Defined in: contract.ts:152
Begin/stop periodic + connectivity-triggered syncing.
Returns
void
stop()
stop(): void;
Defined in: contract.ts:153
Returns
void
syncNow()
syncNow(opts?): Promise<SyncStatus>;
Defined in: contract.ts:148
Runs one full pass. Single-flight: concurrent calls join the running pass.
Parameters
| Parameter | Type |
|---|---|
opts? | { signal?: AbortSignal; } |
opts.signal? | AbortSignal |
Returns
Promise<SyncStatus>