1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! Seed and SeedLoader use for getting peers from endpoint.
use serde::Deserialize;
use serde::Serialize;

use crate::prelude::rings_core::dht::Did;

/// A list contains SeedPeer.
#[derive(Deserialize, Serialize, Debug)]
pub struct Seed {
    pub peers: Vec<SeedPeer>,
}

/// SeedPeer contain `Did` and `endpoint`.
#[derive(Deserialize, Serialize, Debug)]
pub struct SeedPeer {
    /// an unique identify.
    pub did: Did,
    /// remote client endpoint
    pub endpoint: String,
}