import { SyncAgent } from "https://deno.land/x/earthstar@v10.0.0-alpha.2/src/syncer/sync_agent.ts";
Mediates synchronisation on behalf of a Replica
. Tells other SyncAgents what the Replica posseses, what it wants from them, and fulfils requests from other SyncAgents.
Constructors
Properties
An integer representing the number of requests were fulfilled. Quicker than calculating this every time from the fulfilledMap
.
A multi deferred describing if th the SyncAgent has finished or not.
A bus to send events to, and which our readable streams subcribe to.
Here we keep track of all the root IDs of versions we've WANT
ed. Used to prevent offering things to another peer which they already have.
A bus we can update the SyncAgent's status from, and which others can subscribe to.
A readable stream of outbound events intended for a SyncAgent
partner.
A writable stream which takes incoming messages from another SyncAgent.
Methods
Subscribe to status updates with a callback.