Documentation
¶
Overview ¶
Package postgres provides a PostgreSQL-backed searchgate.Store so the search-first gate's discovery signal is shared across replicas.
The backing table's key column is named session_id for historical reasons (migration 000077), but it holds an opaque discovery scope key, not necessarily a session ID: the middleware keys discovery on the authenticated user when known (see middleware.PlatformContext.DiscoveryScopeKey). Do not add session-specific logic (a foreign key to sessions, a per-session join) on the strength of the column name.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements searchgate.Store using PostgreSQL.
func New ¶
New creates a PostgreSQL discovery store. Discovery records expire ttl after the most recent MarkDiscovered.
func (*Store) HasDiscovered ¶
HasDiscovered reports whether the scope has a non-expired discovery record.