api/resolver: add resolve options (#1756)

* api/resolver: Resolve options

* router/registry: fix init bug

* router/registry: fix wildcard query bug

* web: fix registation domain bug

* registry/etcd: pass domain in service metadata

* api/resolver/subdomain: expose domain func

* Update api/resolver/subdomain/subdomain.go

Co-authored-by: Dominic Wong <domwongemail@googlemail.com>

Co-authored-by: Dominic Wong <domwongemail@googlemail.com>
This commit is contained in:
ben-toogood
2020-06-29 16:37:45 +01:00
committed by GitHub
parent 132c1e35fe
commit df3e5364ca
11 changed files with 71 additions and 36 deletions

View File

@@ -674,6 +674,7 @@ func (r *router) Close() error {
// remove event chan
r.eventChan = nil
r.running = false
return nil
}

View File

@@ -150,7 +150,7 @@ func (t *table) List() ([]Route, error) {
func isMatch(route Route, address, gateway, network, router string, strategy Strategy) bool {
// matches the values provided
match := func(a, b string) bool {
if a == "*" || a == b {
if a == "*" || b == "*" || a == b {
return true
}
return false