diff options
author | 2017-12-13 16:59:10 -0500 | |
---|---|---|
committer | 2017-12-13 16:59:10 -0500 | |
commit | 1919913c986b7c1e1652a94bf69e54b503e40a18 (patch) | |
tree | 51ef8c36d4894736c920ac2151693b9a49c49708 /plugin/metrics/metrics_test.go | |
parent | 2e2e5e1bec11e4dc5a7862443a34965b65332e73 (diff) | |
download | coredns-1919913c986b7c1e1652a94bf69e54b503e40a18.tar.gz coredns-1919913c986b7c1e1652a94bf69e54b503e40a18.tar.zst coredns-1919913c986b7c1e1652a94bf69e54b503e40a18.zip |
plugin/metrics: Added New func (#1309)
If external plugins wanted to extend metrics there was no way since
zoneNames couldn't be initialized. Now plugins can call New to get an
instance of Metrics that they can extend.
Diffstat (limited to 'plugin/metrics/metrics_test.go')
-rw-r--r-- | plugin/metrics/metrics_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/metrics/metrics_test.go b/plugin/metrics/metrics_test.go index 54e7859e8..f3e4ba3d8 100644 --- a/plugin/metrics/metrics_test.go +++ b/plugin/metrics/metrics_test.go @@ -13,7 +13,7 @@ import ( ) func TestMetrics(t *testing.T) { - met := &Metrics{Addr: "localhost:0", zoneMap: make(map[string]bool)} + met := New("localhost:0") if err := met.OnStartup(); err != nil { t.Fatalf("Failed to start metrics handler: %s", err) } |