Repository navigation
Coordinate
Daniel Carbone edited this page Nov 6, 2026
·
1 revision
$consul->Coordinate wraps Consul's Coordinate API,
which exposes the network coordinates Consul uses to estimate round-trip times.
[$dcs, $err] = $consul->Coordinate->Datacenters();
foreach ($dcs as $dc) {
echo $dc->Datacenter, ': ', count($dc->Coordinates), " servers\n";
}
[$entries, $qm, $err] = $consul->Coordinate->Nodes();
foreach ($entries as $entry) {
echo $entry->Node, ' ', implode(',', $entry->Coord->Vec), "\n";
}Node(node: 'web-1') returns the entries for a single node. Update() writes a CoordinateEntry, which is
normally only done by Consul agents themselves.