import { TransferManager } from "https://deno.land/x/earthstar@v10.0.0-alpha.4/src/syncer/transfer_manager.ts";
Constructors
new
TransferManager(opts: TransferManagerOpts<FormatsType, IncomingAttachmentSourceType>)Properties
private
expectedTransferPromises: Map<string, Deferred<void>>private
formats: FormatsArg<FormatsType>private
formatsLookup: Record<string, FormatArg<FormatsType>>private
madeAllAttachmentRequestsEnroller: PromiseEnrollerA kind of promise which resolves when all attachment requests have been made.
private
partner: ISyncPartner<IncomingAttachmentSourceType>private
queue: TransferQueueprivate
receivedAllExpectedTransfersEnroller: PromiseEnrollerprivate
reportDidUpdateBus: BlockingBus<Record<string, AttachmentTransferReport[]>>Methods
private
queueTransfer(transfer: AttachmentTransfer<unknown>)cancel()
handleDownload(): Promise<NotSupportedError | "no_attachment" | "queued">
handleTransferRequest(unnamed 0: { replica: Replica; formatName: string; path: Path; author: AuthorAddress; source: IncomingAttachmentSourceType; kind: "upload" | "download"; counterpartId: string; })
handleUpload(transferOpts: Omit<GetTransferOpts, "syncerId">, replica: Replica): Promise<boolean>
isAlreadyQueued(hash: string, kind: "upload" | "download")
onReportUpdate(cb: () => void)
registerExpectedTransfer(share: ShareAddress, hash: string)
registerOtherSyncerId(id: string)
registerSyncAgent(agent: SyncAgent<FormatsType>)