mirror of
https://github.com/coredns/coredns.git
synced 2025-11-28 14:44:12 -05:00
plugin/nomad: Support service filtering (#7724)
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@ type Nomad struct {
|
||||
Zone string
|
||||
clients []*api.Client
|
||||
current int
|
||||
filter string
|
||||
}
|
||||
|
||||
func (n *Nomad) Name() string {
|
||||
@@ -103,7 +104,7 @@ func fetchServiceRegistrations(n Nomad, serviceName, namespace string) ([]*api.S
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return nc.Services().Get(serviceName, (&api.QueryOptions{Namespace: namespace}))
|
||||
return nc.Services().Get(serviceName, (&api.QueryOptions{Namespace: namespace, Filter: n.filter}))
|
||||
}
|
||||
|
||||
func handleServiceLookupError(w dns.ResponseWriter, m *dns.Msg, ctx context.Context, namespace string) (int, error) {
|
||||
|
||||
Reference in New Issue
Block a user