Module reflectors

Module reflectors 

Source
Expand description

Query functions for the reflectors table.

The reflectors table is the central registry populated by Tier 1 discovery sweeps. Each row represents a unique D-STAR reflector identified by its callsign (e.g., REF001, XLX320, DCS001).

Tier 1 fetchers call upsert after each sweep to insert newly-discovered reflectors or update metadata (IP address, dashboard URL, last-seen time) for existing ones. Tier 2 monitors query get_active to decide which reflectors have recent activity and deserve live monitoring.

Structsยง

ReflectorRow ๐Ÿ”’
A single row from the reflectors table.

Functionsยง

count_total ๐Ÿ”’
Returns the total number of rows in the reflectors table.
get_active ๐Ÿ”’
Returns all reflectors that have been seen since the given timestamp.
get_tier2_eligible ๐Ÿ”’
Returns reflectors eligible for Tier 2 monitoring.
set_tier2_available ๐Ÿ”’
Sets the tier2_available flag for a reflector.
upsert ๐Ÿ”’
Inserts a new reflector or updates an existing one on callsign conflict.