get_for_reflector

Function get_for_reflector 

Source
pub(crate) async fn get_for_reflector(
    pool: &PgPool,
    reflector: &str,
) -> Result<Vec<ConnectedNodeRow>, Error>
Expand description

Returns all nodes currently linked to the given reflector.

Results are ordered by last_heard DESC (most recently active first), with NULLS LAST so rows whose last_heard was not reported by the monitor don’t dominate the top of the list. Used by the HTTP API (GET /api/reflectors/{callsign}/nodes) to expose the live node roster.

§Errors

Returns sqlx::Error on query failure.