Home

Awesome

ssb-conn-query

Module that helps querying potential SSB peer connections. For use with the SSB CONN family of modules.

Usage

This module is only used to create an SSB CONN plugin, not used directly by applications. A ConnQuery instance should be available on the CONN plugin, with the following API:

Types

All "peers" returned by these APIs are key-value arrays, of the format:

type Peer = [Address, Data]

where

type Address = string;

type Data = {pool: 'db' | 'hub' | 'staging'} &
  Partial<DBData> &
  Partial<HubData> &
  Partial<StagingData>;

In other words, a peer is an array where the first element is the multiserver address for that peer, and the second element is an object that is either the ConnDB data or the ConnHub or the ConnStaging data (plus an additional field pool).

Instance API

These methods are available on instances of the ConnQuery class:

Static API

These functions are available as statics on the ConnQuery class:

License

MIT