mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Per XLS-0095, we are taking steps to rename ripple(d) to xrpl(d). This change specifically removes all copyright notices referencing Ripple, XRPLF, and certain affiliated contributors upon mutual agreement, so the notice in the LICENSE.md file applies throughout. Copyright notices referencing external contributions remain as-is. Duplicate verbiage is also removed.
40 lines
799 B
C++
40 lines
799 B
C++
#ifndef BEAST_INSIGHT_GROUPS_H_INCLUDED
|
|
#define BEAST_INSIGHT_GROUPS_H_INCLUDED
|
|
|
|
#include <xrpl/beast/insight/Collector.h>
|
|
#include <xrpl/beast/insight/Group.h>
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
namespace beast {
|
|
namespace insight {
|
|
|
|
/** A container for managing a set of metric groups. */
|
|
class Groups
|
|
{
|
|
public:
|
|
virtual ~Groups() = 0;
|
|
|
|
/** Find or create a new collector with a given name. */
|
|
/** @{ */
|
|
virtual Group::ptr const&
|
|
get(std::string const& name) = 0;
|
|
|
|
Group::ptr const&
|
|
operator[](std::string const& name)
|
|
{
|
|
return get(name);
|
|
}
|
|
/** @} */
|
|
};
|
|
|
|
/** Create a group container that uses the specified collector. */
|
|
std::unique_ptr<Groups>
|
|
make_Groups(Collector::ptr const& collector);
|
|
|
|
} // namespace insight
|
|
} // namespace beast
|
|
|
|
#endif
|