mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
530 B
C++
31 lines
530 B
C++
5 years ago
|
#ifndef LLARP_METRICS_STREAM_PUBLISHER_HPP
|
||
|
#define LLARP_METRICS_STREAM_PUBLISHER_HPP
|
||
|
|
||
5 years ago
|
#include <util/metrics/core.hpp>
|
||
5 years ago
|
|
||
|
#include <iosfwd>
|
||
|
|
||
|
namespace llarp
|
||
|
{
|
||
|
namespace metrics
|
||
|
{
|
||
|
class StreamPublisher final : public Publisher
|
||
|
{
|
||
|
std::ostream& m_stream;
|
||
|
|
||
|
public:
|
||
|
StreamPublisher(std::ostream& stream) : m_stream(stream)
|
||
|
{
|
||
|
}
|
||
|
|
||
5 years ago
|
~StreamPublisher() override = default;
|
||
5 years ago
|
|
||
|
void
|
||
|
publish(const Sample& values) override;
|
||
|
};
|
||
|
} // namespace metrics
|
||
|
|
||
|
} // namespace llarp
|
||
|
|
||
|
#endif
|