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().
Set whether small peer info collection is enabled.
when set to a non-boolean value.
The metadata associated with the small peer info.
Small peer info metadata is a free-form, user-provided JSON object that is inserted into the small peer info system document at each collection interval.
Set the metadata associated with the small peer info.
The metadata must be a JSON-serializable object that conforms to the following constraints:
Valid metadata
ditto.smallPeerInfo.metadata = {
"foo": "bar",
"nested": {
"inner": "value"
}
}
Invalid metadata
// This is invalid and results in an error.
ditto.smallPeerInfo.metadata = {
"foo": "bar",
"nested": {
"illegal": {
"inner": "value"
}
}
}
when set to a value that violates any of the constraints listed above.
The metadata associated with the small peer info, as a JSON string.
Set the metadata associated with the small peer info, as a JSON string.
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.
Set the sync scope.
See getSyncScope for more information.
the new sync scope.
when set to a value other than BigPeerOnly
or LocalPeerOnly
.
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.
An instance of this class is available on each
Ditto
instance via itssmallPeerInfo
property. Instantiating this class directly is not supported.