2022-01-20 16:12:04 +00:00
|
|
|
//go:build !consulent
|
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package proxycfg
|
|
|
|
|
|
|
|
import (
|
2022-04-05 21:10:06 +00:00
|
|
|
"github.com/hashicorp/consul/acl"
|
2022-01-20 16:12:04 +00:00
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
)
|
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
func UpstreamIDString(typ, dc, name string, _ *acl.EnterpriseMeta) string {
|
2022-01-20 16:12:04 +00:00
|
|
|
ret := name
|
|
|
|
|
|
|
|
if dc != "" {
|
|
|
|
ret += "?dc=" + dc
|
|
|
|
}
|
|
|
|
|
|
|
|
if typ == "" || typ == structs.UpstreamDestTypeService {
|
|
|
|
return ret
|
|
|
|
}
|
|
|
|
|
|
|
|
return typ + ":" + ret
|
|
|
|
}
|
|
|
|
|
2022-04-05 21:10:06 +00:00
|
|
|
func parseInnerUpstreamIDString(input string) (string, *acl.EnterpriseMeta) {
|
2022-01-20 16:12:04 +00:00
|
|
|
return input, structs.DefaultEnterpriseMetaInDefaultPartition()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (u UpstreamID) enterpriseIdentifierPrefix() string {
|
|
|
|
return ""
|
|
|
|
}
|