plugin/etcdv3: Add etcd v3 plugin (#1702)

* Update dependencies and add etcdv3 client

* Update etcd plugin to support etcd v3 clients

Fixes #341
This commit is contained in:
Nitish Tiwari
2018-06-30 20:49:13 +05:30
committed by Miek Gieben
parent f3afd70021
commit 6fe27d99be
10327 changed files with 4196998 additions and 82 deletions

View File

@@ -15,7 +15,6 @@ import (
"github.com/coredns/coredns/plugin/proxy"
"github.com/coredns/coredns/plugin/test"
etcdc "github.com/coreos/etcd/client"
"github.com/miekg/dns"
)
@@ -300,12 +299,12 @@ func set(t *testing.T, e *Etcd, k string, ttl time.Duration, m *msg.Service) {
t.Fatal(err)
}
path, _ := msg.PathWithWildcard(k, e.PathPrefix)
e.Client.Set(ctxt, path, string(b), &etcdc.SetOptions{TTL: ttl})
e.Client.KV.Put(ctxt, path, string(b))
}
func delete(t *testing.T, e *Etcd, k string) {
path, _ := msg.PathWithWildcard(k, e.PathPrefix)
e.Client.Delete(ctxt, path, &etcdc.DeleteOptions{Recursive: false})
e.Client.Delete(ctxt, path)
}
func TestLookup(t *testing.T) {