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

x/earthstar/src/entries/npm.ts>PartnerLocal

Storage for private, distributed, offline-first applications.
Go to Latest
class PartnerLocal
implements ISyncPartner<undefined>
Re-export
import { PartnerLocal } from "https://deno.land/x/earthstar@v10.0.1/src/entries/npm.ts";

A syncing partner to be used with local instances of IPeer. Works everywhere.

Constructors

new
PartnerLocal(
peer: IPeer,
peerSelf: IPeer,
appetite: SyncAppetite,
)

Type Parameters

FormatsType
IncomingTransferSourceType extends undefined

Properties

private
incomingQueue: AsyncQueue<SyncerEvent>
private
outgoingQueue: AsyncQueue<SyncerEvent>
private
partnerPeer: IPeer
concurrentTransfers: number
payloadThreshold: number
rangeDivision: number
syncAppetite: SyncAppetite

Methods

closeConnection(): Promise<void>
getDownload(opts: GetTransferOpts): Promise<ReadableStream<Uint8Array> | undefined>
getEvents(): AsyncIterable<SyncerEvent>
handleTransferRequest(_source: IncomingTransferSourceType, _kind: "upload" | "download"): Promise<
| ReadableStream<Uint8Array>
| WritableStream<Uint8Array>
| undefined
>
sendEvent(event: SyncerEvent): Promise<void>