Skip to main content
Module

x/earthstar/mod.ts>QueryFollower#state

A specification and Javascript library for building online tools you can truly call your own.
Go to Latest
method QueryFollower.prototype.state
Re-export
import { QueryFollower } from "https://deno.land/x/earthstar@v9.3.3/mod.ts";

Returns the follower's state, which can be in two modes:

  1. catching up with the backlog
  2. caught up; processing new events as they happen. When the query follower is in catching-up mode, it runs independently on its own schedule. When it's in live mode, it processes each doc as it's written, blockingly, which means it provides backpressure all the way back up to whatever is trying to ingest() docs into the storage. There is not currently an easy way to know when a query follower has caught up and switched to live mode, except to listen for the 'idle' event on its bus.