open-consul/agent/consul/state/config_entry_intention_oss.go
Mark Anderson ed3e42296d Fixup acl.EnterpriseMeta
Signed-off-by: Mark Anderson <manderson@hashicorp.com>
2022-04-05 15:11:49 -07:00

23 lines
565 B
Go

//go:build !consulent
// +build !consulent
package state
import (
"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
)
func getIntentionPrecedenceMatchServiceNames(serviceName string, entMeta *acl.EnterpriseMeta) []structs.ServiceName {
if serviceName == structs.WildcardSpecifier {
return []structs.ServiceName{
structs.NewServiceName(structs.WildcardSpecifier, entMeta),
}
}
return []structs.ServiceName{
structs.NewServiceName(serviceName, entMeta),
structs.NewServiceName(structs.WildcardSpecifier, entMeta),
}
}