import { SyncAgent } from "https://deno.land/x/earthstar@v10.0.1/src/syncer/sync_agent.ts";
Mediates synchronisation on behalf of a Replica
.
Constructors
new
SyncAgent(opts: SyncAgentOpts<F>)Properties
private
gossiperInboundQueue: AsyncQueue<SyncAgentEvent>private
isDoneMultiDeferred: MultiDeferred<void>A multi deferred describing if th the SyncAgent has finished or not.
private
outboundEventQueue: AsyncQueue<SyncAgentEvent>Messages generated from us destined for the other peer.
private
reconcilerInboundQueue: AsyncQueue<RangeMessage>private
statusBus: BlockingBus<SyncAgentStatus>A bus we can update the SyncAgent's status from, and which others can subscribe to.
An internal ID we use to distinguish messages from the agent we're syncing with from other messages and docs.
replica: Replica
Methods
events(): AsyncIterable<SyncAgentEvent>
isDone()
onStatusUpdate(callback: (status: SyncAgentStatus) => void)
Subscribe to status updates with a callback.
sendEvent(event: SyncAgentEvent): void