Add more options to the plugin

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-16 07:15:09 +01:00
parent c2594d1768
commit acd0b73a49
4 changed files with 13 additions and 7 deletions

View File

@@ -14,11 +14,12 @@ import (
// Traffic is a plugin that load balances according to assignments.
type Traffic struct {
c *xds.Client
id string
Next plugin.Handler
}
// New returns a pointer to a new and initialized Traffic.
func New() (*Traffic, error) {
func New(addr, node string) (*Traffic, error) {
c, err := xds.New(":18000", "mycoredns")
if err != nil {
return nil, err