mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
Measure and expose DNS programming latency from Kubernetes plugin. (#3171)
For now metric is measure only for headless services. Informer has been slighlty refactored, so the code can measure latency without storing extra fields on Endpoint struct. Signed-off-by: Janek Łukaszewicz <janluk@google.com> Suggestions from code review Co-Authored-By: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -16,14 +16,18 @@
|
||||
package object
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// ToFunc converts one empty interface to another.
|
||||
type ToFunc func(interface{}) interface{}
|
||||
|
||||
// ProcessorBuilder returns function to process cache events.
|
||||
type ProcessorBuilder func(cache.Indexer, cache.ResourceEventHandler) cache.ProcessFunc
|
||||
|
||||
// Empty is an empty struct.
|
||||
type Empty struct{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user