mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-03 23:15:52 +00:00
54 lines
881 B
C++
54 lines
881 B
C++
#pragma once
|
|
|
|
#include <router_id.hpp>
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
namespace llarp
|
|
{
|
|
|
|
namespace path
|
|
{
|
|
struct PathHopConfig;
|
|
|
|
} // namespace llarp::path
|
|
|
|
} // namespace llarp
|
|
|
|
|
|
namespace tooling
|
|
{
|
|
|
|
struct RouterHive;
|
|
|
|
struct RouterEvent
|
|
{
|
|
RouterEvent(llarp::RouterID);
|
|
|
|
virtual ~RouterEvent() = default;
|
|
|
|
virtual void Process(RouterHive& hive) const = 0;
|
|
|
|
virtual std::string ToString() const = 0;
|
|
|
|
llarp::RouterID routerID;
|
|
};
|
|
|
|
using RouterEventPtr = std::unique_ptr<RouterEvent>;
|
|
|
|
|
|
struct PathBuildAttemptEvent : public RouterEvent
|
|
{
|
|
PathBuildAttemptEvent(const llarp::RouterID& routerID, std::vector<llarp::path::PathHopConfig> hops);
|
|
|
|
void Process(RouterHive& hive) const;
|
|
|
|
std::string ToString() const override;
|
|
|
|
std::vector<llarp::path::PathHopConfig> hops;
|
|
};
|
|
|
|
} // namespace tooling
|