Skip to content

Reference

tilttek/table-presence

Every public type of the package, with its role. The types marked internal may change in any version.

Tables

TypeRole
PresenceThe service: open, admit, remove, connect, disconnect, sweep, set availability, visibility and status, forget, close, list who is online, and view.
TableA table: its members in order, its policy, its status and label, whether it is closed, and its version.
MemberOne member: role, visibility, availability and expected return, connections, last contact, and whether the table heard they arrived.
ConnectionOne connection of a member and its last heartbeat.
PresencePolicyThe heartbeat timeout, the grace delay, the most connections and the default visibility.
RoleA member's part: game master, assistant, player or observer; the first two lead.
AvailabilityWhat a member says: here, away or on a break.
VisibilityWho sees a member: the table, the leads or nobody.
TableStatusThe table's own status: gathering, playing, paused or on a break.
PresenceStateA member as a viewer sees them: online, away, on a break or offline.
View\PresenceViewThe table's presence as one viewer sees it.
View\MemberPresenceOne member's presence as one viewer sees it.

Ports and stores

TypeRole
Contract\PresenceStoreKeeps the tables at a version.
Contract\PresenceObserverTold of the events of a table.
Contract\BlockListSays whether a member blocked a viewer.
Store\InMemoryPresenceStoreThe tables in memory, for tests.

Events

TypeRole
Event\PresenceEventEvery event: the table's identifier.
Event\MemberEventAn event of one member: adds the member's identifier.
Event\TableOpenedA table was opened.
Event\MemberAdmittedA member was admitted.
Event\MemberArrivedA member arrived, once per stay.
Event\MemberLeftA member left.
Event\AvailabilityChangedA member said something else of themselves, with the availability.
Event\VisibilityChangedA member changed who sees them, with the visibility.
Event\PresenceForgottenA member's presence was erased.
Event\MemberRemovedA member was removed.
Event\TableStatusChangedThe table's status or label changed, with the status.
Event\TableClosedA table was closed.

Exceptions

TypeRole
Exception\PresenceExceptionEvery exception of the library.
Exception\InvalidPresenceA value out of its shape or its bounds.
Exception\PresenceRefusedA change not allowed on the table in its state.
Exception\PresenceNotFoundNo such table or member.
Exception\PresenceConflictThe table changed since it was read.

Internal

TypeRole
Internal\IdentifierThe shape of every identifier.
Internal\MillisInstants as milliseconds since the epoch.