Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: plugin.Namespace, Subsystem: "kubeforward", Name: "request_duration_seconds", Help: "Histogram of DNS request duration in kubeforward, in seconds", Buckets: prometheus.ExponentialBuckets(0.01, 2, 10), }, []string{"qtype", "rcode"}) SlowRequests = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: plugin.Namespace, Subsystem: "kubeforward", Name: "slow_requests_total", Help: "Total number of DNS requests slower than the configured threshold", }, []string{"qtype", "rcode", "upstream"}) )
Functions ¶
This section is empty.
Types ¶
type KubeForward ¶
type KubeForward struct {
Next plugin.Handler
Namespace string
ServiceName string
// contains filtered or unexported fields
}
KubeForward main struct of plugin
func (*KubeForward) ServeDNS ¶
func (df *KubeForward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)
func (*KubeForward) UpdateForwardServers ¶
func (df *KubeForward) UpdateForwardServers(newServers []string, config KubeForwardConfig)
UpdateForwardServers update list servers for forward requests
type KubeForwardConfig ¶
type KubeForwardConfig struct {
Namespace string
ServiceName string
PortName string
Expire time.Duration
UpstreamReadTimeout time.Duration
SlowThreshold time.Duration
SlowLogEnabled bool
// contains filtered or unexported fields
}
func ParseConfig ¶
func ParseConfig(c *caddy.Controller) (*KubeForwardConfig, error)
ParseConfig parse conf CoreFile
Click to show internal directories.
Click to hide internal directories.