Skip to main content

asimov_protocol/
node_state.rs

1// This is free and unencumbered software released into the public domain.
2
3#![allow(dead_code)]
4
5use super::NodeProtocol;
6use crate::{Endpoint, GossipProtocol, Router};
7use alloc::vec::Vec;
8use iroh::{EndpointId, endpoint::Builder as EndpointBuilder};
9
10#[derive(Debug)]
11pub struct Building {
12    pub(crate) endpoint: EndpointBuilder,
13}
14
15#[derive(Debug)]
16pub struct Bound {
17    pub(crate) endpoint: Endpoint,
18}
19
20#[derive(Debug)]
21pub struct Running {
22    pub(crate) router: Router,
23    pub(crate) node: NodeProtocol,
24    pub(crate) gossip: GossipProtocol,
25    pub(crate) peers: Vec<EndpointId>,
26}
27
28#[derive(Debug)]
29pub struct Terminating {
30    pub(crate) router: Router,
31}