pub fn loopback_only(endpoints: &[String]) -> boolExpand description
Whether every endpoint is a loopback address: reachable from this machine alone. A runtime in that state is not broken and is not on the mesh either, which is a distinction the doctor has to be able to draw before it blames the network for a cooperation that was never reachable. One routable endpoint is enough, so this asks of all of them rather than of any.
use majordomus_cli::mesh::address::loopback_only;
assert!(loopback_only(&["127.0.0.1:8742".into(), "localhost:8742".into()]));
assert!(!loopback_only(&["127.0.0.1:8742".into(), "10.0.0.2:8742".into()]));