diff options
author | Valery Piashchynski <[email protected]> | 2021-04-20 12:09:39 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-04-20 12:09:39 +0300 |
commit | 2faf7bc2cd883294306466282f313bc5a1dc79ef (patch) | |
tree | a1e94592452e7840a5ce7c615766330e0a23fdb7 /plugins/metrics/plugin.go | |
parent | a3ced86a77b406bd8d127135636d33e12517d7f8 (diff) |
- Make http.Serve() async
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/metrics/plugin.go')
-rw-r--r-- | plugins/metrics/plugin.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/metrics/plugin.go b/plugins/metrics/plugin.go index 223788c9..d0443177 100644 --- a/plugins/metrics/plugin.go +++ b/plugins/metrics/plugin.go @@ -9,7 +9,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - endure "github.com/spiral/endure/pkg/container" "github.com/spiral/errors" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" @@ -199,8 +198,8 @@ func (m *Plugin) Collects() []interface{} { } } -// Collector returns application specific collector by name or nil if collector not found. -func (m *Plugin) AddStatProvider(name endure.Named, stat StatProvider) error { +// AddStatProvider adds a metrics provider +func (m *Plugin) AddStatProvider(stat StatProvider) error { for _, c := range stat.MetricsCollector() { err := m.registry.Register(c) if err != nil { @@ -211,7 +210,7 @@ func (m *Plugin) AddStatProvider(name endure.Named, stat StatProvider) error { return nil } -// RPC interface satisfaction +// Name returns user friendly plugin name func (m *Plugin) Name() string { return PluginName } |