Skip to main content

subscribe_repos

Function subscribe_repos 

Source
pub(crate) async fn subscribe_repos(
    __arg0: State<AppState>,
    peer: Peer,
    headers: HeaderMap,
    upgrade: WebSocketUpgrade,
    __arg4: Query<SubscribeParams>,
) -> Response
Expand description

GET /xrpc/com.atproto.sync.subscribeRepos

Credential::Open: the lexicon says “public and does not require auth”, and a relay that had to authenticate could not crawl this server.

A WebSocket of framed DAG-CBOR, one #commit per commit this server makes, resumable from a cursor. This is the method a relay crawls — see crate::subscribe.

The cursor is read here and the connection is opened either way: an error the lexicon declares is a frame on the socket followed by a close, not an HTTP status, because a client that asked for an upgrade is not reading for one.