Class SmallPeerInfo

The entrypoint for small peer user info collection. Small peer info consists of information gathered into a system collection on a regular interval and optionally synced to the Big Peer for device dashboard and debugging purposes.

You don't create this class directly, but can access it from a particular Ditto instance via its smallPeerInfo property.

Hierarchy

  • SmallPeerInfo

Accessors

Methods

Accessors

  • get isEnabled(): boolean
  • Indicates whether small peer info collection is currently enabled, defaults to false.

    Note: whether the background ingestion process is enabled or not is a separate decision to whether this information is allowed to sync to other peers (including the big peer). This is controlled by getSyncScope() and setSyncScope().

    Returns boolean

  • set isEnabled(newValue): void
  • Set whether small peer info collection is enabled.

    Parameters

    • newValue: boolean

    Returns void

    Throws

    when set to a non-boolean value.

Methods

  • Determines which "kind" of peers the small peer info will be replicated to.

    Defaults to LocalPeerOnly, which means no replication. Set this to BigPeerOnly to replicate collected info to the Big Peer.

    Returns Promise<SmallPeerInfoSyncScope>

  • Set the sync scope.

    See getSyncScope for more information.

    Parameters

    Returns Promise<void>

    Throws

    when set to a value other than BigPeerOnly or LocalPeerOnly.