Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/earthstar/src/peer/peer.ts>Peer#discover

Storage for private, distributed, offline-first applications.
Go to Latest
method Peer.prototype.discover
import { Peer } from "https://deno.land/x/earthstar@v10.2.0/src/peer/peer.ts";

Discover other Earthstar peers using a discovery service, for example other peers on the local network.

Returns an asynchronous iterable of DiscoveryEvent, which describe finding a Peer, another peer initiating sync with you, etc. Some of these events have callbacks which let you initiate sync with the discovered peer.

Returns

AsyncIterable<DiscoveryEvent>