import { Syncer } from "https://deno.land/x/earthstar@v9.3.3/src/entries/universal.ts";
A generic syncer which can be used with any kind of Transport.
Constructors
new
Syncer(peer: Peer, makeTransport: (methods: SyncerBag) => TransportType)Instantiate a new Syncer
Type Parameters
TransportType extends ITransport<SyncerBag>
Properties
private
coordinators: Map<string, SyncCoordinator>private
peer: PeersyncStatuses: SuperbusMap<string, Record<ShareAddress, SyncSessionStatus>>
A subscribable map containing the syncer's connections' sync statuses.
transport: TransportType
The transport used by the syncer. Can be used to add new connections.
Methods
private
onCaughtUp(storageId: string, isCaughtUp: boolean)close()
Close the syncer's transport and all synchronisations.