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}}
,但我怎麼能由兩個標籤篩選我領事模板內的服務立刻?