RepoHandle
A class in fastatp.server.peer_server (source).
RepoHandle(server: PeerServer, host: _HostedRepo)
A write + admin handle to one hosted repo.
This is the only write path to a non-primary repo. There is
deliberately no emit(did=...) string-target write API: a confused or
swapped DID string could otherwise write a record into the wrong repo —
signed under the wrong identity and/or exposed to the wrong subscribers. A
handle cannot be confused with another repo's handle. Private
channels are exactly server.register(...) handles.
Attributes
did: strrepo: Reposeq: intpublic: boolowner_pull: bool | OwnerRuleexpires_at: datetime | None
Methods
put_record
async put_record(collection: str, rkey: str, record: RecordLike) -> CommitEvent | None
delete_record
async delete_record(collection: str, rkey: str) -> CommitEvent | None
apply_writes
async apply_writes(writes: list[WriteOp]) -> CommitEvent | None
emit_account
async emit_account(*, active: bool = True, status: str | None = None) -> None
Re-announce this repo's hosting status (#account).
emit_identity
async emit_identity(*, handle: str | None = None) -> None
Prod subscribers to refresh this DID's identity (#identity).
emit_sync
async emit_sync() -> None
Announce the head to subscribers after a push landed through
repo.import_car (which emits nothing by itself).
expire
async expire() -> None
Retire this repo now — the channel-owner's "TTL reached / done with
it" intent. A semantic alias that delegates to unregister
so the two can never drift; kept as the name a channel reads
naturally.
unregister
async unregister() -> None
Stop hosting this repo and cut its live subscribers.