@roomy-chat/sdk
    Preparing search index...

    Class Peer

    The entrypoint for opening Entitys, loading and saving them automatically from StorageManagers, and syncing them with Syncer1s.

    Index

    Methods

    Constructors

    Methods

    • Commit the entity, stop syncing it, and flush it to storage.

      Parameters

      Returns Promise<void>

    • Delete an entity completely from local storage.

      TODO: Currently there is no way to have sync peers receive a request to delete an entity. It is only deleted locally.

      Parameters

      Returns Promise<void>

    • Open the entity with the given ID.

      This will try to load the entity from all read storages and await on that before returning.

      It will also start syncing the entity with all of the peer's syncers.

      Parameters

      Returns Promise<Entity>

    Constructors

    • Parameters

      Returns Peer