diff options
author | 2018-10-15 12:43:03 -0400 | |
---|---|---|
committer | 2018-10-15 12:43:03 -0400 | |
commit | 6beeabc47ccebd77de2a41192e1cca3a882127a3 (patch) | |
tree | b77b0a4492edf2786b52bdaf5604047b9602ceba /plugin/federation/setup.go | |
parent | 1847ef6bd31ecd38fe5d19e54c47a812cb2ed303 (diff) | |
download | coredns-6beeabc47ccebd77de2a41192e1cca3a882127a3.tar.gz coredns-6beeabc47ccebd77de2a41192e1cca3a882127a3.tar.zst coredns-6beeabc47ccebd77de2a41192e1cca3a882127a3.zip |
plugin/federation: Add upstream option to federation (#2177)
* add upstream
* add upstream
* debug ci
* debug ci
* set context
* update readme
* update readme
* remove empty if
Diffstat (limited to 'plugin/federation/setup.go')
-rw-r--r-- | plugin/federation/setup.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugin/federation/setup.go b/plugin/federation/setup.go index 06daaf4e1..84e9aba16 100644 --- a/plugin/federation/setup.go +++ b/plugin/federation/setup.go @@ -6,6 +6,7 @@ import ( "github.com/coredns/coredns/core/dnsserver" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/kubernetes" + "github.com/coredns/coredns/plugin/pkg/upstream" "github.com/miekg/dns" "github.com/mholt/caddy" @@ -62,6 +63,13 @@ func federationParse(c *caddy.Controller) (*Federation, error) { for c.NextBlock() { x := c.Val() switch x { + case "upstream": + args := c.RemainingArgs() + u, err := upstream.New(args) + if err != nil { + return nil, err + } + fed.Upstream = &u default: args := c.RemainingArgs() if x := len(args); x != 1 { |