Ditto 5.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ditto::SmallPeerInfo Class Reference

The entrypoint for small peer user info collection. More...

Public Member Functions

nlohmann::json metadata () const
 Gets the metadata as JSON.
 
void set_metadata (nlohmann::json metadata) const
 Sets the metadata as user-provided json and is inserted into the small peer info system doc at each collection interval.
 
std::string metadata_json_string () const
 
void set_metadata_json_string (std::string metadata) const
 Sets the metadata as user-provided json string and is inserted into the small peer info system doc at each collection interval.
 
bool is_enabled () const
 Gets a value indicating whether small peer info collection is currently enabled. Defaults to true.
 
void set_enabled (bool enabled) const
 Sets a value indicating whether small peer info collection is currently enabled. Defaults to true.
 

Detailed Description

The entrypoint for small peer user info collection.

Member Function Documentation

◆ set_metadata()

void ditto::SmallPeerInfo::set_metadata ( nlohmann::json  metadata) const

Sets the metadata as user-provided json and is inserted into the small peer info system doc at each collection interval.

The metadata has no schema except for the following constraints:

  1. All contained values must be JSON serializable.
  2. The size of the metadata serialized as JSON may not exceed 128 KB.
  3. The metadata may only be nested up to 64 levels deep.

◆ set_metadata_json_string()

void ditto::SmallPeerInfo::set_metadata_json_string ( std::string  metadata) const

Sets the metadata as user-provided json string and is inserted into the small peer info system doc at each collection interval.

The metadata has no schema except for the following constraints:

  1. All contained values must be JSON serializable.
  2. The size of the metadata serialized as JSON may not exceed 128 KB.
  3. The metadata may only be nested up to 64 levels deep.