presence/

directory
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT

Directories

Path Synopsis
Package conformance is a shared test suite every gateway.Presence implementation must pass, so gateway.MemoryPresence and presence/redis.Presence (and any third-party implementation) are held to the exact same contract - most importantly the lease contract, because an implementation that keeps a dead node's connections online forever makes IsOnline permanently true and silently disables the offline delivery channel.
Package conformance is a shared test suite every gateway.Presence implementation must pass, so gateway.MemoryPresence and presence/redis.Presence (and any third-party implementation) are held to the exact same contract - most importantly the lease contract, because an implementation that keeps a dead node's connections online forever makes IsOnline permanently true and silently disables the offline delivery channel.
RefreshGeneration and LeaveGeneration are the generation-fenced counterparts of Refresh and Leave: they let a caller that knows its connection's owner-lease generation (see the root gateway package's WithOwnerLease/ownerLease) attach it to a presence write, so a write issued by a node whose ownership a takeover has already superseded is rejected rather than resurrecting or destroying membership state a newer owner established since.
RefreshGeneration and LeaveGeneration are the generation-fenced counterparts of Refresh and Leave: they let a caller that knows its connection's owner-lease generation (see the root gateway package's WithOwnerLease/ownerLease) attach it to a presence write, so a write issued by a node whose ownership a takeover has already superseded is rejected rather than resurrecting or destroying membership state a newer owner established since.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL