Fawkes API Fawkes Development Version
metrics_manager.h
1
2/***************************************************************************
3 * metrics_manager.h - Metrics supplier interface
4 *
5 * Created: Fri Jul 28 22:08:16 2017
6 * Copyright 2017 Tim Niemueller [www.niemueller.de]
7 ****************************************************************************/
8
9/* This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Library General Public License for more details.
18 *
19 * Read the full text in the LICENSE.GPL file in the doc directory.
20 */
21
22#ifndef _PLUGINS_METRICS_ASPECT_METRICS_MANAGER_H_
23#define _PLUGINS_METRICS_ASPECT_METRICS_MANAGER_H_
24
25#include <core/utils/lock_list.h>
26#include <plugins/metrics/aspect/metrics_supplier.h>
27#include <plugins/metrics/protobuf/metrics.pb.h>
28
29namespace fawkes {
30
32{
33public:
34 virtual ~MetricsManager();
35
36 virtual std::list<io::prometheus::client::MetricFamily> all_metrics() = 0;
37
38 virtual void add_supplier(MetricsSupplier *supplier) = 0;
39 virtual void remove_supplier(MetricsSupplier *supplier) = 0;
40
42};
43
44} // end namespace fawkes
45
46#endif
Base class for metrics managers.
virtual void add_supplier(MetricsSupplier *supplier)=0
Add metrics supplier.
virtual ~MetricsManager()
Virtual empty destructor.
virtual const fawkes::LockList< MetricsSupplier * > & metrics_suppliers() const =0
Get list of current metrics suppliers.
virtual std::list< io::prometheus::client::MetricFamily > all_metrics()=0
Get combination of all metrics.
virtual void remove_supplier(MetricsSupplier *supplier)=0
Remove metrics supplier.
Metrics supplier class.
Fawkes library namespace.