plugin/forward/grpc: Revert forward/grpc policy dedup (#3919)
* revert de-dup Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * unit test Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * use roundrobin policy in test Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
parent
bc2ba28865
commit
54fb2112ac
8 changed files with 166 additions and 104 deletions
|
@ -10,7 +10,6 @@ import (
|
|||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/metrics"
|
||||
"github.com/coredns/coredns/plugin/pkg/parse"
|
||||
"github.com/coredns/coredns/plugin/pkg/policy"
|
||||
pkgtls "github.com/coredns/coredns/plugin/pkg/tls"
|
||||
"github.com/coredns/coredns/plugin/pkg/transport"
|
||||
|
||||
|
@ -221,11 +220,11 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
|
|||
}
|
||||
switch x := c.Val(); x {
|
||||
case "random":
|
||||
f.p = &policy.Random{}
|
||||
f.p = &random{}
|
||||
case "round_robin":
|
||||
f.p = &policy.RoundRobin{}
|
||||
f.p = &roundRobin{}
|
||||
case "sequential":
|
||||
f.p = &policy.Sequential{}
|
||||
f.p = &sequential{}
|
||||
default:
|
||||
return c.Errf("unknown policy '%s'", x)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue