tailcfg: update location docs

This change updates the documentation for the fields on the location
struct.

Updates tailscale/corp#12146

Signed-off-by: Charlotte Brandhorst-Satzkorn <charlotte@tailscale.com>
pull/8471/head
Charlotte Brandhorst-Satzkorn 1 year ago committed by Charlotte Brandhorst-Satzkorn
parent 832f1028c7
commit 9c64e015e5

@ -535,15 +535,22 @@ type Service struct {
// Tailscale host. Location is optional and only set if // Tailscale host. Location is optional and only set if
// explicitly declared by a node. // explicitly declared by a node.
type Location struct { type Location struct {
Country string `json:",omitempty"` // User friendly country name, with proper capitalization, e.g "Canada" Country string `json:",omitempty"` // User friendly country name, with proper capitalization ("Canada")
CountryCode string `json:",omitempty"` // ISO 3166-1 alpha-2 in lower case, e.g "ca" CountryCode string `json:",omitempty"` // ISO 3166-1 alpha-2 in upper case ("CA")
City string `json:",omitempty"` // User friendly city name, with proper capitalization, e.g. "Squamish" City string `json:",omitempty"` // User friendly city name, with proper capitalization ("Squamish")
CityCode string `json:",omitempty"`
// CityCode is a short code representing the city in upper case.
// Priority determines the priority an exit node is given when the // CityCode is used to disambiguate a city from another location
// location data between two or more nodes is tied. // with the same city name. It uniquely identifies a particular
// A higher value indicates that the exit node is more preferable // geographical location, within the tailnet.
// for use. // IATA, ICAO or ISO 3166-2 codes are recommended ("YSE")
CityCode string `json:",omitempty"`
// Priority 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 // A value of 0 means the exit node does not have a priority
// preference. A negative int is not allowed. // preference. A negative int is not allowed.
Priority int `json:",omitempty"` Priority int `json:",omitempty"`

Loading…
Cancel
Save