Skip to main content

Module mesh_id

Module mesh_id 

Source
Expand description

Mesh identity types.

ResourceId is the common control-plane identifier for mesh resources. The mesh-specific newtypes ActorMeshId, ProcMeshId, and HostMeshId provide type safety at mesh struct boundaries while converting freely to ResourceId for resource message plumbing.

§Where resource ids are used

ResourceId is the stable key used by resource messages in resource.rs (GetRankStatus, WaitRankStatus, CreateOrUpdate, Stop, GetState, StreamState, and List) and by the internal state maps in proc_agent.rs and host_mesh/host_agent.rs.

The same logical resource may be rendered into other name spaces:

  • The control-plane resource name is ResourceId::to_string().
  • The runtime actor id is carried as ActorMeshId::uid() by ProcRef::actor_id() in proc_mesh.rs and by ProcAgent when it calls remote.gspawn(...).
  • The runtime proc name is ResourceId::to_string(), which is consumed by HostRef::named_proc() in host_mesh.rs and by HostAgent when it spawns a proc on a host.
  • Telemetry uses display_label() for human-facing given_name, while to_string() is emitted as the stable full_name.

§String formats

ResourceId has two externally visible string forms:

  • Singleton: label
  • Labeled instance: label-uid58

Here uid58 is the base58 instance component produced by Uid::Instance, without angle brackets. Instances always render with a label. When an instance has no explicit label metadata, the formatter uses the id type’s default label, such as proc, actor, or resource.

Identity is uid-only: labels are descriptive metadata and do not participate in Eq, Hash, or Ord.

Structs§

ActorMeshId
Identifies an actor mesh.
HostMeshId
Identifies a host mesh.
ProcMeshId
Identifies a proc mesh.
ResourceId
Identifies a resource in the mesh system.

Enums§

ResourceIdParseError
Errors that can occur when parsing a ResourceId from a string.