pub struct Location {
pub country: String,
pub country_code: String,
pub city: String,
pub city_code: String,
pub latitude: f64,
pub longitude: f64,
pub priority: i64,
}Expand description
Location represents geographical location data about a Tailscale host. Location is optional and only set if explicitly declared by a node.
Fields§
§country: StringUser friendly country name, with proper capitalization (“Canada”)
country_code: StringISO 3166-1 alpha-2 in upper case (“CA”)
city: StringUser friendly city name, with proper capitalization (“Squamish”)
city_code: StringCityCode is a short code representing the city in upper case. CityCode is used to disambiguate a city from another location with the same city name. It uniquely identifies a particular geographical location, within the tailnet. IATA, ICAO or ISO 3166-2 codes are recommended (“YSE”)
latitude: f64Latitude, Longitude are optional geographical coordinates of the node, in degrees. No particular accuracy level is promised; the coordinates may simply be the center of the city or country.
longitude: f64§priority: i64Priority determines the order of use of an exit node when a location based preference matches more than one exit node, the node with the highest priority wins. Nodes of equal probability may be selected arbitrarily.
A value of 0 means the exit node does not have a priority preference. A negative int is not allowed.