blob: df774fa9864f00d131fd3eb5baa6109b5a7a4bba (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* \class storage::framework::MetricRegistrator
* \ingroup metric
*
* \brief Interface used to register a metric in the backend.
*
* To avoid needing the framework module to depend on the metric system (in
* case any users don't use it), this class exist to remove this dependency.
*/
#pragma once
#include <vespa/vespalib/util/time.h>
namespace metrics {
class Metric;
}
namespace storage::framework {
struct MetricUpdateHook;
struct MetricRegistrator {
virtual ~MetricRegistrator() = default;
virtual void registerMetric(metrics::Metric&) = 0;
virtual void registerUpdateHook(vespalib::stringref name, MetricUpdateHook& hook, vespalib::system_time::duration period) = 0;
};
}
|