xrpld
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::insight {
10
14class Groups
15{
16public:
17 virtual ~Groups() = 0;
18
23 virtual Group::Ptr const&
24 get(std::string const& name) = 0;
25
26 Group::Ptr const&
28 {
29 return get(name);
30 }
31
32};
33
38makeGroups(Collector::Ptr const& collector);
39
40} // namespace beast::insight
std::shared_ptr< Collector > Ptr
Definition Collector.h:29
std::shared_ptr< Group > Ptr
Definition Group.h:16
A container for managing a set of metric groups.
Definition Groups.h:15
Group::Ptr const & operator[](std::string const &name)
Definition Groups.h:27
virtual Group::Ptr const & get(std::string const &name)=0
Find or create a new collector with a given name.
std::unique_ptr< Groups > makeGroups(Collector::Ptr const &collector)
Create a group container that uses the specified collector.
Definition Groups.cpp:115