aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin.md6
-rw-r--r--plugin/autopath/autopath.go2
-rw-r--r--plugin/autopath/setup.go6
-rw-r--r--plugin/autopath/setup_test.go2
-rw-r--r--plugin/etcd/cname_test.go2
-rw-r--r--plugin/etcd/group_test.go2
-rw-r--r--plugin/etcd/lookup_test.go4
-rw-r--r--plugin/etcd/multi_test.go2
-rw-r--r--plugin/etcd/other_test.go2
-rw-r--r--plugin/etcd/stub_test.go2
-rw-r--r--plugin/health/healther.go2
-rw-r--r--plugin/health/setup.go2
-rw-r--r--test/etcd_cache_test.go2
-rw-r--r--test/etcd_test.go4
-rw-r--r--test/external_test.go6
15 files changed, 23 insertions, 23 deletions
diff --git a/plugin.md b/plugin.md
index b71e2ed0c..da5167270 100644
--- a/plugin.md
+++ b/plugin.md
@@ -1,6 +1,6 @@
-# Middleware
+# Plugins
-## Writing Middleware
+## Writing Plugins
From the Caddy docs:
@@ -136,7 +136,7 @@ compute.internal. 3600 IN MX 10 mx.compute.internal.
## Qualifying for main repo
-Middleware for CoreDNS can live out-of-tree, `plugin.cfg` defaults to CoreDNS' repo but other
+Plugins for CoreDNS can live out-of-tree, `plugin.cfg` defaults to CoreDNS' repo but other
repos work just as well. So when do we consider the inclusion of a new plugin in the main repo?
* First, the plugin should be useful for other people. "Useful" is a subjective term. We will
diff --git a/plugin/autopath/autopath.go b/plugin/autopath/autopath.go
index 5c804a040..aa3d44e6a 100644
--- a/plugin/autopath/autopath.go
+++ b/plugin/autopath/autopath.go
@@ -25,7 +25,7 @@ autopath.Func. Note the searchpath must be ending with the empty string.
I.e:
-func (m Middleware ) AutoPath(state request.Request) []string {
+func (m Plugins ) AutoPath(state request.Request) []string {
return []string{"first", "second", "last", ""}
}
*/
diff --git a/plugin/autopath/setup.go b/plugin/autopath/setup.go
index c83912a63..c5a39a870 100644
--- a/plugin/autopath/setup.go
+++ b/plugin/autopath/setup.go
@@ -49,8 +49,8 @@ func setup(c *caddy.Controller) error {
return nil
}
-// allowedMiddleware has a list of plugin that can be used by autopath.
-var allowedMiddleware = map[string]bool{
+// allowedPlugins has a list of plugin that can be used by autopath.
+var allowedPlugins = map[string]bool{
"@kubernetes": true,
"@erratic": true,
}
@@ -66,7 +66,7 @@ func autoPathParse(c *caddy.Controller) (*AutoPath, string, error) {
}
resolv := zoneAndresolv[len(zoneAndresolv)-1]
if resolv[0] == '@' {
- _, ok := allowedMiddleware[resolv]
+ _, ok := allowedPlugins[resolv]
if ok {
mw = resolv[1:]
}
diff --git a/plugin/autopath/setup_test.go b/plugin/autopath/setup_test.go
index 3e13aa74f..530036934 100644
--- a/plugin/autopath/setup_test.go
+++ b/plugin/autopath/setup_test.go
@@ -55,7 +55,7 @@ func TestSetupAutoPath(t *testing.T) {
}
if !test.shouldErr && mw != test.expectedMw {
- t.Errorf("Test %d, Middleware not correctly set for input %s. Expected: %s, actual: %s", i, test.input, test.expectedMw, mw)
+ t.Errorf("Test %d, Plugin not correctly set for input %s. Expected: %s, actual: %s", i, test.input, test.expectedMw, mw)
}
if !test.shouldErr && ap.search != nil {
if !reflect.DeepEqual(test.expectedSearch, ap.search) {
diff --git a/plugin/etcd/cname_test.go b/plugin/etcd/cname_test.go
index 33291094b..7f53ccd64 100644
--- a/plugin/etcd/cname_test.go
+++ b/plugin/etcd/cname_test.go
@@ -16,7 +16,7 @@ import (
// Check the ordering of returned cname.
func TestCnameLookup(t *testing.T) {
- etc := newEtcdMiddleware()
+ etc := newEtcdPlugin()
for _, serv := range servicesCname {
set(t, etc, serv.Key, 0, serv)
diff --git a/plugin/etcd/group_test.go b/plugin/etcd/group_test.go
index d7f6172c7..1af1bdc7f 100644
--- a/plugin/etcd/group_test.go
+++ b/plugin/etcd/group_test.go
@@ -13,7 +13,7 @@ import (
)
func TestGroupLookup(t *testing.T) {
- etc := newEtcdMiddleware()
+ etc := newEtcdPlugin()
for _, serv := range servicesGroup {
set(t, etc, serv.Key, 0, serv)
diff --git a/plugin/etcd/lookup_test.go b/plugin/etcd/lookup_test.go
index 1f52d5993..1cd771a57 100644
--- a/plugin/etcd/lookup_test.go
+++ b/plugin/etcd/lookup_test.go
@@ -221,7 +221,7 @@ var dnsTestCases = []test.Case{
},
}
-func newEtcdMiddleware() *Etcd {
+func newEtcdPlugin() *Etcd {
ctxt = context.TODO()
endpoints := []string{"http://localhost:2379"}
@@ -253,7 +253,7 @@ func delete(t *testing.T, e *Etcd, k string) {
}
func TestLookup(t *testing.T) {
- etc := newEtcdMiddleware()
+ etc := newEtcdPlugin()
for _, serv := range services {
set(t, etc, serv.Key, 0, serv)
defer delete(t, etc, serv.Key)
diff --git a/plugin/etcd/multi_test.go b/plugin/etcd/multi_test.go
index 56b5af265..40d405bdf 100644
--- a/plugin/etcd/multi_test.go
+++ b/plugin/etcd/multi_test.go
@@ -13,7 +13,7 @@ import (
)
func TestMultiLookup(t *testing.T) {
- etc := newEtcdMiddleware()
+ etc := newEtcdPlugin()
etc.Zones = []string{"skydns.test.", "miek.nl."}
etc.Fallthrough = true
etc.Next = test.ErrorHandler()
diff --git a/plugin/etcd/other_test.go b/plugin/etcd/other_test.go
index d28c33537..6399c770e 100644
--- a/plugin/etcd/other_test.go
+++ b/plugin/etcd/other_test.go
@@ -17,7 +17,7 @@ import (
)
func TestOtherLookup(t *testing.T) {
- etc := newEtcdMiddleware()
+ etc := newEtcdPlugin()
for _, serv := range servicesOther {
set(t, etc, serv.Key, 0, serv)
diff --git a/plugin/etcd/stub_test.go b/plugin/etcd/stub_test.go
index 56fd481b7..63635d849 100644
--- a/plugin/etcd/stub_test.go
+++ b/plugin/etcd/stub_test.go
@@ -39,7 +39,7 @@ func TestStubLookup(t *testing.T) {
exampleNetStub := &msg.Service{Host: host, Port: port, Key: "a.example.net.stub.dns.skydns.test."}
servicesStub = append(servicesStub, exampleNetStub)
- etc := newEtcdMiddleware()
+ etc := newEtcdPlugin()
for _, serv := range servicesStub {
set(t, etc, serv.Key, 0, serv)
diff --git a/plugin/health/healther.go b/plugin/health/healther.go
index ad0261dfb..fa776222a 100644
--- a/plugin/health/healther.go
+++ b/plugin/health/healther.go
@@ -37,6 +37,6 @@ func (h *health) poll() {
h.SetOk(true)
}
-// Middleware that implements the Healther interface.
+// Plugins that implements the Healther interface.
// TODO(miek): none yet.
var healthers = map[string]bool{}
diff --git a/plugin/health/setup.go b/plugin/health/setup.go
index 2fec9baa7..070d5f2a1 100644
--- a/plugin/health/setup.go
+++ b/plugin/health/setup.go
@@ -49,7 +49,7 @@ func setup(c *caddy.Controller) error {
c.OnStartup(h.Startup)
c.OnFinalShutdown(h.Shutdown)
- // Don't do AddMiddleware, as health is not *really* a plugin just a separate webserver running.
+ // Don't do AddPlugin, as health is not *really* a plugin just a separate webserver running.
return nil
}
diff --git a/test/etcd_cache_test.go b/test/etcd_cache_test.go
index a927a08f8..b14374455 100644
--- a/test/etcd_cache_test.go
+++ b/test/etcd_cache_test.go
@@ -32,7 +32,7 @@ func TestEtcdCache(t *testing.T) {
}
defer ex.Stop()
- etc := etcdMiddleware()
+ etc := etcdPlugin()
log.SetOutput(ioutil.Discard)
var ctx = context.TODO()
diff --git a/test/etcd_test.go b/test/etcd_test.go
index 66502e8dc..fcd1ddced 100644
--- a/test/etcd_test.go
+++ b/test/etcd_test.go
@@ -20,7 +20,7 @@ import (
"golang.org/x/net/context"
)
-func etcdMiddleware() *etcd.Etcd {
+func etcdPlugin() *etcd.Etcd {
etcdCfg := etcdc.Config{
Endpoints: []string{"http://localhost:2379"},
}
@@ -53,7 +53,7 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
}
defer ex.Stop()
- etc := etcdMiddleware()
+ etc := etcdPlugin()
log.SetOutput(ioutil.Discard)
var ctx = context.TODO()
diff --git a/test/external_test.go b/test/external_test.go
index 6b014552c..86799e320 100644
--- a/test/external_test.go
+++ b/test/external_test.go
@@ -12,8 +12,8 @@ import (
// and check if it is really there, but running coredns -plugins.
// Dangerous test as it messes with your git tree, maybe use tag?
-func testExternalMiddlewareCompile(t *testing.T) {
- if err := addExampleMiddleware(); err != nil {
+func testExternalPluginCompile(t *testing.T) {
+ if err := addExamplePlugin(); err != nil {
t.Fatal(err)
}
defer run(t, gitReset)
@@ -50,7 +50,7 @@ func run(t *testing.T, c *exec.Cmd) ([]byte, error) {
}
-func addExampleMiddleware() error {
+func addExamplePlugin() error {
f, err := os.OpenFile("../plugin.cfg", os.O_APPEND|os.O_WRONLY, os.ModeAppend)
if err != nil {
return err