mirror of
https://github.com/coredns/coredns.git
synced 2025-12-08 19:35:10 -05:00
Dedup policy implement between grpc and proxy plugin (#3537)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/metrics"
|
||||
"github.com/coredns/coredns/plugin/pkg/policy"
|
||||
"github.com/coredns/coredns/plugin/pkg/parse"
|
||||
pkgtls "github.com/coredns/coredns/plugin/pkg/tls"
|
||||
"github.com/coredns/coredns/plugin/pkg/transport"
|
||||
@@ -202,11 +203,11 @@ func parseBlock(c *caddy.Controller, f *Forward) error {
|
||||
}
|
||||
switch x := c.Val(); x {
|
||||
case "random":
|
||||
f.p = &random{}
|
||||
f.p = &policy.Random{}
|
||||
case "round_robin":
|
||||
f.p = &roundRobin{}
|
||||
f.p = &policy.RoundRobin{}
|
||||
case "sequential":
|
||||
f.p = &sequential{}
|
||||
f.p = &policy.Sequential{}
|
||||
default:
|
||||
return c.Errf("unknown policy '%s'", x)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user