api: ensure empty locality field is not transmitted to Consul (#17137)

This commit is contained in:
R.B. Boyer 2023-04-26 10:01:17 -05:00 committed by GitHub
parent f2a96a8bac
commit f74aedada0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -78,8 +78,8 @@ type CatalogRegistration struct {
Check *AgentCheck
Checks HealthChecks
SkipNodeUpdate bool
Partition string `json:",omitempty"`
Locality *Locality
Partition string `json:",omitempty"`
Locality *Locality `json:",omitempty"`
}
type CatalogDeregistration struct {

View File

@ -47,7 +47,7 @@ type PeeringRemoteInfo struct {
Partition string
// Datacenter is the remote peer's datacenter.
Datacenter string
Locality *Locality
Locality *Locality `json:",omitempty"`
}
// Locality identifies where a given entity is running.