Crate grafos_registry

Crate grafos_registry 

Source
Expand description

Fabric-wide service registry for grafOS.

RegistryRegion stores service registrations in a FabricHashMap backed by leased fabric memory. Services register via RegistryWriter and are discovered via RegistryReader. Change detection uses a monotonic version counter exposed through RegistryWatcher.

§Quick start

use grafos_registry::{RegistryBuilder, ServiceRegistration, ServiceEndpoint, HealthStatus};

let (mut writer, _reader) = RegistryBuilder::new()
    .capacity(64)
    .build()?;

let reg = ServiceRegistration::new("my-service", "1.0.0", 1)
    .with_endpoint(ServiceEndpoint::net([10, 0, 0, 1], 8080))
    .with_tag("region", "us-east");

writer.register(reg)?;

let results = writer.lookup("my-service")?;
assert_eq!(results.len(), 1);

§Feature flags

FeatureDefaultEffect
stdYesEnables std in grafos-std
observeNoEnables grafos-observe metrics
rpcNoAdds grafos-rpc RpcResolver integration
durableNoCold-start checkpoint to block storage

Structs§

RegistryBuilder
Builder for creating a registry writer/reader pair.
RegistryFilter
Filter criteria for registry lookups.
RegistryReader
Read handle for the service registry.
RegistryRegion
Fabric-backed registry storage.
RegistryWatcher
Tracks the last-seen registry version and detects changes.
RegistryWriter
Write handle for the service registry.
ServiceRegistration
A single service registration in the registry.

Enums§

HealthStatus
Health status of a service instance.
ServiceEndpoint
A reachable endpoint for a service instance.