rippled
Loading...
Searching...
No Matches
Groups.h
1#pragma once
2
3#include <xrpl/beast/insight/Collector.h>
4#include <xrpl/beast/insight/Group.h>
5
6#include <memory>
7#include <string>
8
9namespace beast {
10namespace insight {
11
13class Groups
14{
15public:
16 virtual ~Groups() = 0;
17
20 virtual Group::ptr const&
21 get(std::string const& name) = 0;
22
23 Group::ptr const&
25 {
26 return get(name);
27 }
29};
30
33make_Groups(Collector::ptr const& collector);
34
35} // namespace insight
36} // namespace beast
std::shared_ptr< Collector > ptr
Definition Collector.h:27
A container for managing a set of metric groups.
Definition Groups.h:14
Group::ptr const & operator[](std::string const &name)
Definition Groups.h:24
virtual Group::ptr const & get(std::string const &name)=0
Find or create a new collector with a given name.
std::unique_ptr< Groups > make_Groups(Collector::ptr const &collector)
Create a group container that uses the specified collector.
Definition Groups.cpp:115