baf886c6f3
The gist here is that now we use a value-type struct proxycfg.UpstreamID as the map key in ConfigSnapshot maps where we used to use "upstream id-ish" strings. These are internal only and used just for bidirectional trips through the agent cache keyspace (like the discovery chain target struct). For the few places where the upstream id needs to be projected into xDS, that's what (proxycfg.UpstreamID).EnvoyID() is for. This lets us ALWAYS inject the partition and namespace into these things without making stuff like the golden testdata diverge.
19 lines
338 B
Go
19 lines
338 B
Go
//go:build !consulent
|
|
// +build !consulent
|
|
|
|
package structs
|
|
|
|
func (us *Upstream) GetEnterpriseMeta() *EnterpriseMeta {
|
|
return DefaultEnterpriseMetaInDefaultPartition()
|
|
}
|
|
|
|
func (us *Upstream) DestinationID() ServiceID {
|
|
return ServiceID{
|
|
ID: us.DestinationName,
|
|
}
|
|
}
|
|
|
|
func (us *Upstream) enterpriseStringPrefix() string {
|
|
return ""
|
|
}
|