Crate grafos_locator

Crate grafos_locator 

Source
Expand description

Typed locators and rendezvous/handoff records for fabric resource discovery.

This crate provides two things:

  1. Locator types — small, versioned structs that describe where a fabric resource lives (memory region, block region, queue, RPC arena, replica set). All locators are postcard-serializable and carry an explicit version: u8 field for forward compatibility.

  2. Handoff records — a writer/reader pair backed by block storage that lets a producer publish new locators with monotonically increasing generations, and consumers detect changes by polling.

§Locator types

TypeDescribes
MemRegionLocatorByte range within a memory lease
BlockRegionLocatorLBA range within a block lease
QueueLocatorRing buffer in a memory lease
RpcArenaLocatorRequest/response arena pair
ReplicaSetLocatorSet of memory replicas

§Handoff pattern

Writer                          Block Storage                     Reader
  |                                  |                              |
  |-- publish(new_locator) --------->|                              |
  |   (bump generation, serialize)   |                              |
  |                                  |<-------- poll() -------------|
  |                                  |  (deserialize, check gen)    |
  |                                  |--------- Some(state) ------->|

§Feature flags

FeatureDefaultEffect
stdYesEnables std in grafos-std
sync-watchNoAdds grafos-sync watch channel integration

Modules§

handoff
Handoff records: durable writer/reader for locator rendezvous.
locator
Typed locator structs for fabric resources.