import { type ISyncPartner } from "https://deno.land/x/earthstar@v10.0.1/src/entries/universal.ts";
Provides a syncer with the means to connect the peer being synced with (the partner).
Properties
syncAppetite: SyncAppetite
The size at which a subdivided reconciliation range should send a fingerprint instead of items. Must be at least 1.
A lower number mean fewer messages transmitted.
Methods
getEvents(): AsyncIterable<SyncerEvent>
An async iterable of events from the partner.
sendEvent(event: SyncerEvent): Promise<void>
Sends a syncer event to the partner.
getDownload(opts: GetTransferOpts): Promise<ReadableStream<Uint8Array> | undefined | NotSupportedError>
Attempt to download an attachment directly from the partner.
handleUploadRequest(opts: GetTransferOpts): Promise<WritableStream<Uint8Array> | NotSupportedError>
Handles (usually in-band) request from the other peer to upload an attachment.
handleTransferRequest(source: IncomingAttachmentSourceType, kind: "upload" | "download"): Promise<>
Handles an out-of-band request from the other peer to start a transfer.