pub trait MeshResolver {
// Required method
fn resolve(
&self,
ident: &MeshIdent,
kind: MeshLookup,
) -> Result<String, MeshError>;
}Expand description
Resolve crate::EnvValue::FromMesh references to literal env values.
Defined in workload-spec so clients (agents, desktop, CLI) can render
specs against fake mesh state without depending on the yubaba crate.
Yubaba’s production implementation (in yubaba::deploy::mesh_resolve)
reads from raft state.
Resolution rules match the arch doc §“Mesh-derived env”:
MeshLookup::Url—"http://<ident>:<port>", whereportis the first entry in the referenced workload’sMeshExpose.ports.MeshLookup::Host— the bare DNS-ish identifier as authored (e.g."noisetable-db.pdx").MeshLookup::Port— the first port stringified, e.g."5432".
Implementations should perform the port lookup atomically — a Url and
Port resolved in the same deploy must agree on which port was first.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".