Browse Source

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

pull/17103/head^2
R.B. Boyer 2 years ago committed by GitHub
parent
commit
c501da01eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      api/catalog.go
  2. 2
      api/peering.go

4
api/catalog.go

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

2
api/peering.go

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

Loading…
Cancel
Save