llarp/tooling/router_event.hpp

Namespaces

Name
llarp
[crypto.hpp]
llarp::path
tooling

Classes

Name
struct tooling::RouterEvent

Source code

#pragma once

#include <llarp/router_id.hpp>

#include <string>
#include <vector>
#include <memory>

namespace llarp
{
  struct PathID_t;

  namespace path
  {
    struct Path;
    struct PathHopConfig;

    struct TransitHop;

  }  // namespace path

}  // namespace llarp

namespace tooling
{
  struct RouterHive;

  struct RouterEvent
  {
    RouterEvent(std::string eventType, llarp::RouterID routerID, bool triggered)
        : eventType(eventType), routerID(routerID), triggered(triggered)
    {}

    virtual ~RouterEvent() = default;

    virtual std::string
    ToString() const
    {
      std::string result;
      result += eventType;
      result += " [";
      result += routerID.ShortString();
      result += "] -- ";
      return result;
    }

    const std::string eventType;

    llarp::RouterID routerID;

    bool triggered = false;
  };

  using RouterEventPtr = std::unique_ptr<RouterEvent>;

}  // namespace tooling

Updated on 2026-01-10 at 22:49:45 +0000