Module xlx_api

Module xlx_api 

Source
Expand description

XLX API XML reflector list fetcher.

Fetches the live XLX reflector registry from http://xlxapi.rlx.lu/api.php?do=GetReflectorList and upserts each reflector into the reflectors Postgres table.

The XLX API is the authoritative source for XLX-family reflectors. Unlike the Pi-Star host file (which only provides IP addresses), this feed includes dashboard URLs, uptime, country, and last-contact timestamps โ€” making it the richest Tier 1 data source.

All XLX reflectors expose a UDP JSON monitor on port 10001, so this fetcher sets tier2_available = true for every reflector it discovers, enabling automatic Tier 2 promotion.

Poll interval: every 10 minutes (default 600 s). The XLX network is dynamic โ€” reflectors come and go, and the API rate limit is generous enough for this cadence.

Structsยง

XlxAnswer ๐Ÿ”’
The <answer> element containing the reflector list.
XlxApiResponse ๐Ÿ”’
Top-level XML envelope: <XLXAPI>.
XlxReflector ๐Ÿ”’
A single <reflector> entry from the XLX API.
XlxReflectorList ๐Ÿ”’
The <reflectorlist> element โ€” a wrapper around the reflector array.

Constantsยง

XLX_API_URL ๐Ÿ”’
XLX API endpoint URL.

Functionsยง

fetch_and_store ๐Ÿ”’
Fetches the XLX reflector list and upserts all entries into Postgres.