1
我公司拥有一批领事节点,看起来类似于:一个标签如何使用consul-template中的多个标签过滤consul节点?
[
{
"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}}
,但我怎么能由两个标签筛选我领事模板内的服务立刻?