mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-02 03:40:12 +00:00
31 lines
530 B
C++
31 lines
530 B
C++
#ifndef LLARP_METRICS_STREAM_PUBLISHER_HPP
|
|
#define LLARP_METRICS_STREAM_PUBLISHER_HPP
|
|
|
|
#include <util/metrics/core.hpp>
|
|
|
|
#include <iosfwd>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace metrics
|
|
{
|
|
class StreamPublisher final : public Publisher
|
|
{
|
|
std::ostream& m_stream;
|
|
|
|
public:
|
|
StreamPublisher(std::ostream& stream) : m_stream(stream)
|
|
{
|
|
}
|
|
|
|
~StreamPublisher() override = default;
|
|
|
|
void
|
|
publish(const Sample& values) override;
|
|
};
|
|
} // namespace metrics
|
|
|
|
} // namespace llarp
|
|
|
|
#endif
|