mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
fix: delete unused var and const (#3294)
Signed-off-by: hwdef <hwdef97@gmail.com>
This commit is contained in:
@@ -184,7 +184,6 @@ func setVersion() {
|
|||||||
// Flags that control program flow or startup
|
// Flags that control program flow or startup
|
||||||
var (
|
var (
|
||||||
conf string
|
conf string
|
||||||
logfile bool
|
|
||||||
version bool
|
version bool
|
||||||
plugins bool
|
plugins bool
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -55,13 +55,6 @@ var (
|
|||||||
Help: "The number of elements in the dnssec cache.",
|
Help: "The number of elements in the dnssec cache.",
|
||||||
}, []string{"server", "type"})
|
}, []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{
|
cacheHits = prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||||
Namespace: plugin.Namespace,
|
Namespace: plugin.Namespace,
|
||||||
Subsystem: "dnssec",
|
Subsystem: "dnssec",
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
frameLenSize = 4
|
|
||||||
protobufSize = 1024 * 1024
|
protobufSize = 1024 * 1024
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -199,15 +199,6 @@ var (
|
|||||||
ErrCachedClosed = errors.New("cached connection was closed by peer")
|
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.
|
// options holds various options that can be set.
|
||||||
type options struct {
|
type options struct {
|
||||||
forceTCP bool
|
forceTCP bool
|
||||||
|
|||||||
@@ -80,6 +80,5 @@ func (p *Proxy) start(duration time.Duration) {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
maxTimeout = 2 * time.Second
|
maxTimeout = 2 * time.Second
|
||||||
minTimeout = 200 * time.Millisecond
|
|
||||||
hcInterval = 500 * time.Millisecond
|
hcInterval = 500 * time.Millisecond
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user