2020-02-26 19:19:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-27 21:16:46 +00:00
|
|
|
#include <router_id.hpp>
|
|
|
|
|
2020-02-26 19:19:38 +00:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2020-02-27 21:16:46 +00:00
|
|
|
#include <memory>
|
2020-02-26 19:19:38 +00:00
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
2020-03-03 04:15:18 +00:00
|
|
|
struct PathID_t;
|
|
|
|
|
2020-02-26 20:12:14 +00:00
|
|
|
namespace path
|
|
|
|
{
|
2020-03-01 00:26:23 +00:00
|
|
|
struct Path;
|
2020-02-26 20:12:14 +00:00
|
|
|
struct PathHopConfig;
|
|
|
|
|
2020-03-01 00:26:23 +00:00
|
|
|
struct TransitHop;
|
|
|
|
|
2020-03-07 01:20:11 +00:00
|
|
|
} // namespace path
|
2020-02-26 19:19:38 +00:00
|
|
|
|
2020-03-07 01:20:11 +00:00
|
|
|
} // namespace llarp
|
2020-02-26 19:19:38 +00:00
|
|
|
|
|
|
|
namespace tooling
|
|
|
|
{
|
2020-02-26 20:12:14 +00:00
|
|
|
struct RouterHive;
|
|
|
|
|
2020-02-26 19:19:38 +00:00
|
|
|
struct RouterEvent
|
|
|
|
{
|
2020-04-07 18:38:56 +00:00
|
|
|
RouterEvent(std::string eventType, llarp::RouterID routerID, bool triggered)
|
2020-03-12 19:51:57 +00:00
|
|
|
: eventType(eventType), routerID(routerID), triggered(triggered)
|
|
|
|
{
|
|
|
|
}
|
2020-02-27 21:16:46 +00:00
|
|
|
|
2020-02-26 19:19:38 +00:00
|
|
|
virtual ~RouterEvent() = default;
|
|
|
|
|
2020-03-07 01:20:11 +00:00
|
|
|
virtual std::string
|
2020-03-12 19:51:57 +00:00
|
|
|
ToString() const
|
|
|
|
{
|
|
|
|
std::string result;
|
|
|
|
result += eventType;
|
|
|
|
result += " [";
|
|
|
|
result += routerID.ShortString();
|
|
|
|
result += "] -- ";
|
|
|
|
return result;
|
|
|
|
}
|
2020-03-01 02:04:28 +00:00
|
|
|
|
|
|
|
const std::string eventType;
|
2020-02-26 19:19:38 +00:00
|
|
|
|
|
|
|
llarp::RouterID routerID;
|
2020-02-29 22:53:54 +00:00
|
|
|
|
|
|
|
bool triggered = false;
|
2020-02-26 19:19:38 +00:00
|
|
|
};
|
|
|
|
|
2020-04-07 18:38:56 +00:00
|
|
|
using RouterEventPtr = std::unique_ptr<RouterEvent>;
|
2020-02-27 21:16:46 +00:00
|
|
|
|
2020-03-07 01:20:11 +00:00
|
|
|
} // namespace tooling
|