mirror of
https://github.com/coredns/coredns.git
synced 2025-11-12 23:12:17 -05:00
More stuff copied from SkyDNS
This commit is contained in:
@@ -3,9 +3,10 @@ package etcd
|
||||
|
||||
import (
|
||||
"github.com/miekg/coredns/middleware"
|
||||
"github.com/miekg/dns"
|
||||
"github.com/skynetservices/skydns/singleflight"
|
||||
|
||||
etcd "github.com/coreos/etcd/client"
|
||||
etcdc "github.com/coreos/etcd/client"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
@@ -19,10 +20,15 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func NewEtcd(client etcd.KeysAPI, ctx context.Context) Etcd {
|
||||
func NewEtcd(client etcdc.KeysAPI, next middleware.Handler) Etcd {
|
||||
return Etcd{
|
||||
Next: next,
|
||||
client: client,
|
||||
ctx: ctx,
|
||||
ctx: context.Background(),
|
||||
inflight: &singleflight.Group{},
|
||||
}
|
||||
}
|
||||
|
||||
func (e Etcd) ServerDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ like SkyDNS.
|
||||
## Syntax
|
||||
|
||||
~~~
|
||||
etcd [address...]
|
||||
etcd [endpoint...]
|
||||
~~~
|
||||
|
||||
* `address` is the endpoint of etcd.
|
||||
* `endpoint` is the endpoint of etcd.
|
||||
|
||||
The will default to `/skydns` as the path and the local etcd proxy (http://127.0.0.1:2379).
|
||||
|
||||
@@ -18,9 +18,14 @@ The will default to `/skydns` as the path and the local etcd proxy (http://127.0
|
||||
etcd {
|
||||
round_robin
|
||||
path /skydns
|
||||
address address...
|
||||
endpoint address...
|
||||
stubzones
|
||||
}
|
||||
~~~
|
||||
|
||||
* `round_robin`
|
||||
* `path` /skydns
|
||||
* `endpoint` address...
|
||||
* `stubzones`
|
||||
|
||||
## Examples
|
||||
|
||||
Reference in New Issue
Block a user