Add CultMesh peer exchange catalogs

This commit is contained in:
Meta Vens 2026-05-20 01:35:39 +01:00
commit c612eb4307
10 changed files with 718 additions and 1 deletions

View file

@ -11,6 +11,8 @@ Namespace: `GameCult.Mesh`
- `CultMesh.CreateNodeAsync(...)`
- `CultMesh.StartNodeAsync(...)`
- `CultMesh.CreateVerseCatalog()`
- `CultMesh.CreatePeerCatalog()`
- `CultMesh.CreateVerseDiscoveryClient(...)`
- `CultMesh.CreateClient(...)`
- `CultMesh.ConnectClient(...)`
@ -48,6 +50,19 @@ responses to a node. The wire contracts are
Consumers can apply a response directly with
`CultMeshVerseCatalog.Upsert(CultMeshVerseCatalogResponseMessage)`.
### Peer Exchange
`CultMeshPeerCatalog` is the local reactive catalog for peer cards.
`CultMeshPeerCard` describes a candidate peer endpoint for one Verse with
roles, shard hints, optional region, optional authority lease id, expiry, and
signature.
`CultMesh.ServePeerExchange(node, catalog)` attaches schema-v0 peer exchange
responses to a node. The wire contracts are
`cultmesh.peer_exchange_request.v0` and `cultmesh.peer_exchange_response.v0`.
Peer cards are discovery hints; authority still requires a valid lease or
signature for the target Verse.
### Shard Authority
Each shard has one primary writer for now. Non-primary writes are rejected or