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

x/earthstar/src/entries/node.ts>PartnerWebServer

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

A syncing partner to be used with servers reachable via the internet. Works everywhere.

Constructors

new
PartnerWebServer(opts: SyncerDriverWebClientOpts)

Type Parameters

IncomingTransferSourceType extends undefined

Properties

private
incomingQueue: AsyncQueue<SyncerEvent>
private
isSecure: boolean
private
socket: WebSocket
private
socketIsReady
private
wsUrl: string
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
| NotSupportedError
>
handleUploadRequest(opts: GetTransferOpts): Promise<WritableStream<Uint8Array> | NotSupportedError>
sendEvent(event: SyncerEvent): Promise<void>