aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar li mengyang <hwdef97@gmail.com> 2019-09-24 14:06:38 +0800
committerGravatar Miek Gieben <miek@miek.nl> 2019-09-24 07:06:37 +0100
commit50bac4d3c3032005dc509ee4e95f1f0803c14c63 (patch)
treee0017c30bbe081b8c77c0e24a67d9b6d320355c0
parent081e45afa3c72dcde92c771b5adac2e1521d278e (diff)
downloadcoredns-50bac4d3c3032005dc509ee4e95f1f0803c14c63.tar.gz
coredns-50bac4d3c3032005dc509ee4e95f1f0803c14c63.tar.zst
coredns-50bac4d3c3032005dc509ee4e95f1f0803c14c63.zip
fix: delete unused var and const (#3294)
Signed-off-by: hwdef <hwdef97@gmail.com>
-rw-r--r--coremain/run.go1
-rw-r--r--plugin/dnssec/handler.go7
-rw-r--r--plugin/dnstap/dnstapio/dnstap_encoder.go1
-rw-r--r--plugin/forward/forward.go9
-rw-r--r--plugin/forward/proxy.go1
5 files changed, 0 insertions, 19 deletions
diff --git a/coremain/run.go b/coremain/run.go
index 508c74c62..b62878c3a 100644
--- a/coremain/run.go
+++ b/coremain/run.go
@@ -184,7 +184,6 @@ func setVersion() {
// Flags that control program flow or startup
var (
conf string
- logfile bool
version bool
plugins bool
)
diff --git a/plugin/dnssec/handler.go b/plugin/dnssec/handler.go
index 6153bf331..a901b746a 100644
--- a/plugin/dnssec/handler.go
+++ b/plugin/dnssec/handler.go
@@ -55,13 +55,6 @@ var (
Help: "The number of elements in the dnssec cache.",
}, []string{"server", "type"})
- cacheCapacity = prometheus.NewGaugeVec(prometheus.GaugeOpts{
- Namespace: plugin.Namespace,
- Subsystem: "dnssec",
- Name: "cache_capacity",
- Help: "The dnssec cache's capacity.",
- }, []string{"server", "type"})
-
cacheHits = prometheus.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "dnssec",
diff --git a/plugin/dnstap/dnstapio/dnstap_encoder.go b/plugin/dnstap/dnstapio/dnstap_encoder.go
index 07dfc8413..65b15f587 100644
--- a/plugin/dnstap/dnstapio/dnstap_encoder.go
+++ b/plugin/dnstap/dnstapio/dnstap_encoder.go
@@ -11,7 +11,6 @@ import (
)
const (
- frameLenSize = 4
protobufSize = 1024 * 1024
)
diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go
index 4abd80bae..4e54ef466 100644
--- a/plugin/forward/forward.go
+++ b/plugin/forward/forward.go
@@ -199,15 +199,6 @@ var (
ErrCachedClosed = errors.New("cached connection was closed by peer")
)
-// policy tells forward what policy for selecting upstream it uses.
-type policy int
-
-const (
- randomPolicy policy = iota
- roundRobinPolicy
- sequentialPolicy
-)
-
// options holds various options that can be set.
type options struct {
forceTCP bool
diff --git a/plugin/forward/proxy.go b/plugin/forward/proxy.go
index bf4d68dca..78b2cf3b8 100644
--- a/plugin/forward/proxy.go
+++ b/plugin/forward/proxy.go
@@ -80,6 +80,5 @@ func (p *Proxy) start(duration time.Duration) {
const (
maxTimeout = 2 * time.Second
- minTimeout = 200 * time.Millisecond
hcInterval = 500 * time.Millisecond
)