rippled
Loading...
Searching...
No Matches
Groups.h
1#ifndef BEAST_INSIGHT_GROUPS_H_INCLUDED
2#define BEAST_INSIGHT_GROUPS_H_INCLUDED
3
4#include <xrpl/beast/insight/Collector.h>
5#include <xrpl/beast/insight/Group.h>
6
7#include <memory>
8#include <string>
9
10namespace beast {
11namespace insight {
12
14class Groups
15{
16public:
17 virtual ~Groups() = 0;
18
21 virtual Group::ptr const&
22 get(std::string const& name) = 0;
23
24 Group::ptr const&
26 {
27 return get(name);
28 }
30};
31
34make_Groups(Collector::ptr const& collector);
35
36} // namespace insight
37} // namespace beast
38
39#endif
std::shared_ptr< Collector > ptr
Definition Collector.h:28
A container for managing a set of metric groups.
Definition Groups.h:15
Group::ptr const & operator[](std::string const &name)
Definition Groups.h:25
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:118