Reference
tilttek/table-presenceEvery public type of the package, with its role. The types marked internal may change in any version.
Tables
| Type | Role |
|---|---|
Presence | The service: open, admit, remove, connect, disconnect, sweep, set availability, visibility and status, forget, close, list who is online, and view. |
Table | A table: its members in order, its policy, its status and label, whether it is closed, and its version. |
Member | One member: role, visibility, availability and expected return, connections, last contact, and whether the table heard they arrived. |
Connection | One connection of a member and its last heartbeat. |
PresencePolicy | The heartbeat timeout, the grace delay, the most connections and the default visibility. |
Role | A member's part: game master, assistant, player or observer; the first two lead. |
Availability | What a member says: here, away or on a break. |
Visibility | Who sees a member: the table, the leads or nobody. |
TableStatus | The table's own status: gathering, playing, paused or on a break. |
PresenceState | A member as a viewer sees them: online, away, on a break or offline. |
View\PresenceView | The table's presence as one viewer sees it. |
View\MemberPresence | One member's presence as one viewer sees it. |
Ports and stores
| Type | Role |
|---|---|
Contract\PresenceStore | Keeps the tables at a version. |
Contract\PresenceObserver | Told of the events of a table. |
Contract\BlockList | Says whether a member blocked a viewer. |
Store\InMemoryPresenceStore | The tables in memory, for tests. |
Events
| Type | Role |
|---|---|
Event\PresenceEvent | Every event: the table's identifier. |
Event\MemberEvent | An event of one member: adds the member's identifier. |
Event\TableOpened | A table was opened. |
Event\MemberAdmitted | A member was admitted. |
Event\MemberArrived | A member arrived, once per stay. |
Event\MemberLeft | A member left. |
Event\AvailabilityChanged | A member said something else of themselves, with the availability. |
Event\VisibilityChanged | A member changed who sees them, with the visibility. |
Event\PresenceForgotten | A member's presence was erased. |
Event\MemberRemoved | A member was removed. |
Event\TableStatusChanged | The table's status or label changed, with the status. |
Event\TableClosed | A table was closed. |
Exceptions
| Type | Role |
|---|---|
Exception\PresenceException | Every exception of the library. |
Exception\InvalidPresence | A value out of its shape or its bounds. |
Exception\PresenceRefused | A change not allowed on the table in its state. |
Exception\PresenceNotFound | No such table or member. |
Exception\PresenceConflict | The table changed since it was read. |
Internal
| Type | Role |
|---|---|
Internal\Identifier | The shape of every identifier. |
Internal\Millis | Instants as milliseconds since the epoch. |