ServiceBackend interface (#369)
* Add ServiceBackend interface This adds a ServiceBackend interface that is shared between etcd/etcd3 (later) and kubernetes, leading to a massive reduction in code. When returning the specific records from their backend. Fixes #273
This commit is contained in:
parent
81d5baee28
commit
27d893cf33
15 changed files with 273 additions and 503 deletions
|
@ -28,17 +28,16 @@ func init() {
|
|||
func newEtcdMiddleware() *Etcd {
|
||||
ctxt, _ = context.WithTimeout(context.Background(), etcdTimeout)
|
||||
|
||||
etcdCfg := etcdc.Config{
|
||||
Endpoints: []string{"http://localhost:2379"},
|
||||
}
|
||||
cli, _ := etcdc.New(etcdCfg)
|
||||
endpoints := []string{"http://localhost:2379"}
|
||||
client, _ := newEtcdClient(endpoints, "", "", "")
|
||||
|
||||
return &Etcd{
|
||||
Proxy: proxy.New([]string{"8.8.8.8:53"}),
|
||||
PathPrefix: "skydns",
|
||||
Ctx: context.Background(),
|
||||
Inflight: &singleflight.Group{},
|
||||
Zones: []string{"skydns.test.", "skydns_extra.test.", "in-addr.arpa."},
|
||||
Client: etcdc.NewKeysAPI(cli),
|
||||
Client: client,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue