Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/earthstar/src/syncer/transfer_queue.ts>TransferQueue

Earthstar is a tool for private, undiscoverable, offline-first networks.
Go to Latest
class TransferQueue
import { TransferQueue } from "https://deno.land/x/earthstar@v10.0.0-beta.5/src/syncer/transfer_queue.ts";

Constructors

new
TransferQueue(activeLimit: number)

Properties

private
active: Set<AttachmentTransfer<unknown>>
private
activeLimit: number
private
completed: Set<AttachmentTransfer<unknown>>
private
failed: Set<AttachmentTransfer<unknown>>
private
reportBus: BlockingBus<Record<string, AttachmentTransferReport[]>>
private
reports: Record<string, Record<string, AttachmentTransferReport>>
private
transfersRequestedByUsEnroller: PromiseEnroller
private
waiting: AttachmentTransfer<unknown>[]

Methods

private
activate(transfer: AttachmentTransfer<unknown>)
private
admitNext()
private
queue(transfer: AttachmentTransfer<unknown>)
private
updateTransferStatus(transfer: AttachmentTransfer<unknown>)
addTransfer(transfer: AttachmentTransfer<unknown>)
getReport(): Record<string, AttachmentTransferReport[]>
hasQueuedTransfer(hash: string, kind: "upload" | "download")
onReportUpdate(cb: (report: Record<string, AttachmentTransferReport[]>) => void)