summaryrefslogtreecommitdiff
path: root/plugins/metrics
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-01 17:33:47 +0300
committerValery Piashchynski <[email protected]>2020-12-01 17:33:47 +0300
commit3805b875c6498a9697c692c010bc022e8ebd50b0 (patch)
tree00635f6a6e9b1029e302f8e96faa7ab269fb43bd /plugins/metrics
parent84c8234ec01ad1d5ea5f0a8c7dbca9a3012bcb2b (diff)
golangci linters fix
Diffstat (limited to 'plugins/metrics')
-rw-r--r--plugins/metrics/plugin.go8
-rw-r--r--plugins/metrics/tests/metrics_test.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/metrics/plugin.go b/plugins/metrics/plugin.go
index 3fd42ee4..c115826b 100644
--- a/plugins/metrics/plugin.go
+++ b/plugins/metrics/plugin.go
@@ -18,8 +18,8 @@ import (
)
const (
- // ID declares public service name.
- ServiceName = "metrics"
+ // PluginName declares plugin name.
+ PluginName = "metrics"
// maxHeaderSize declares max header size for prometheus server
maxHeaderSize = 1024 * 1024 * 100 // 104MB
)
@@ -42,7 +42,7 @@ type Plugin struct {
// Init service.
func (m *Plugin) Init(cfg config.Configurer, log log.Logger) error {
const op = errors.Op("Metrics Init")
- err := cfg.UnmarshalKey(ServiceName, &m.cfg)
+ err := cfg.UnmarshalKey(PluginName, &m.cfg)
if err != nil {
return err
}
@@ -218,7 +218,7 @@ func (m *Plugin) AddStatProvider(name endure.Named, stat metrics.StatProvider) e
// RPC interface satisfaction
func (m *Plugin) Name() string {
- return ServiceName
+ return PluginName
}
// RPC interface satisfaction
diff --git a/plugins/metrics/tests/metrics_test.go b/plugins/metrics/tests/metrics_test.go
index 4709d275..f9014c95 100644
--- a/plugins/metrics/tests/metrics_test.go
+++ b/plugins/metrics/tests/metrics_test.go
@@ -107,7 +107,7 @@ func TestMetricsInit(t *testing.T) {
}
func TestMetricsGaugeCollector(t *testing.T) {
- cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.Visualize(endure.StdOut, ""))
+ cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel))
if err != nil {
t.Fatal(err)
}
@@ -174,7 +174,7 @@ func TestMetricsGaugeCollector(t *testing.T) {
}
func TestMetricsDifferentRPCCalls(t *testing.T) {
- cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel), endure.Visualize(endure.StdOut, ""))
+ cont, err := endure.NewContainer(nil, endure.SetLogLevel(endure.DebugLevel))
if err != nil {
t.Fatal(err)
}