1 2 3 4 5 6 7 8 9
//! tonin-discovery: build endpoint URLs from service names. //! //! Convention: `service_url("greeter", "default")` → //! `http://greeter.default.svc.cluster.local:50051`. //! Linkerd multi-cluster gateways make this resolve cross-cluster transparently. pub fn service_url(name: &str, namespace: &str) -> String { format!("http://{name}.{namespace}.svc.cluster.local:50051") }