mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 19:05:19 -05:00
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/pkg/fall"
|
||||
clog "github.com/coredns/coredns/plugin/pkg/log"
|
||||
"github.com/coredns/coredns/plugin/pkg/upstream"
|
||||
|
||||
@@ -36,6 +37,8 @@ func init() {
|
||||
func setup(c *caddy.Controller, f func(*credentials.Credentials) route53iface.Route53API) error {
|
||||
keys := map[string]string{}
|
||||
credential := credentials.NewEnvCredentials()
|
||||
var fall fall.F
|
||||
|
||||
up, _ := upstream.New(nil)
|
||||
for c.Next() {
|
||||
args := c.RemainingArgs()
|
||||
@@ -75,6 +78,8 @@ func setup(c *caddy.Controller, f func(*credentials.Credentials) route53iface.Ro
|
||||
if err != nil {
|
||||
return c.Errf("invalid upstream: %v", err)
|
||||
}
|
||||
case "fallthrough":
|
||||
fall.SetZonesFromArgs(c.RemainingArgs())
|
||||
default:
|
||||
return c.Errf("unknown property '%s'", c.Val())
|
||||
}
|
||||
@@ -86,6 +91,7 @@ func setup(c *caddy.Controller, f func(*credentials.Credentials) route53iface.Ro
|
||||
if err != nil {
|
||||
return c.Errf("failed to create Route53 plugin: %v", err)
|
||||
}
|
||||
h.Fall = fall
|
||||
if err := h.Run(ctx); err != nil {
|
||||
return c.Errf("failed to initialize Route53 plugin: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user