20 lines
398 B
C++
20 lines
398 B
C++
#pragma once
|
|
#include <map>
|
|
#include <string>
|
|
#include <mutex>
|
|
#include "Metrics/Host.h"
|
|
|
|
namespace Model
|
|
{
|
|
class HostRegistry
|
|
{
|
|
public:
|
|
void update(const std::string &host, const Metrics::Host &m);
|
|
std::map<std::string, Metrics::Host> snapshot();
|
|
|
|
private:
|
|
std::map<std::string, Metrics::Host> hosts_;
|
|
std::mutex mutex_;
|
|
};
|
|
} // namespace Model
|