pub(crate) async fn fetch_and_store(
client: &Client,
pool: &PgPool,
) -> Result<usize, FetchError>Expand description
Fetches the XLX reflector list and upserts all entries into Postgres.
Returns the number of reflectors successfully upserted. After upserting
each reflector, also sets tier2_available = true since all XLX reflectors
support the UDP JSON monitor protocol on port 10001.
ยงErrors
FetchError::Httpif the HTTP request fails.FetchError::Xmlif the XML response cannot be deserialized.FetchError::Databaseif any database operation fails.