我有一些类似于以下内容的领事节点:
[
{
"Address": "127.0.0.1",
"Node": "foo",
"ServiceAddress": "",
"ServiceName": "api",
"ServicePort": 8100,
"ServiceTags": [
"production",
"blocking"
]
},
{
"Address": "127.0.0.1",
"Node": "foo",
"ServiceAddress": "",
"ServiceName": "api",
"ServicePort": 8101,
"ServiceTags": [
"production",
"nonblocking"
]
}
]
按一个标签过滤很容易:
{{range service "production.api"}}
{{.Address}}
{{end}}
但是如何一次通过两个标签过滤我的领事模板中的服务?