pub struct BootstrapConfig {
pub cidr: String,
pub node_ip: IpAddr,
pub interface: String,
pub port: u16,
pub private_key: String,
pub public_key: String,
pub is_leader: bool,
pub created_at: u64,
}Expand description
Overlay network bootstrap configuration
Contains all configuration needed to initialize and manage an overlay network on a node.
Fields§
§cidr: StringNetwork CIDR (e.g., “10.200.0.0/16”)
node_ip: IpAddrThis node’s overlay IP address (IPv4 or IPv6)
interface: StringOverlay interface name
port: u16Overlay listen port
private_key: StringThis node’s overlay private key
public_key: StringThis node’s overlay public key
is_leader: boolWhether this node is the cluster leader
created_at: u64Creation timestamp (Unix epoch seconds)
Implementations§
Source§impl BootstrapConfig
impl BootstrapConfig
Sourcepub fn allowed_ip(&self) -> String
pub fn allowed_ip(&self) -> String
Get the overlay IP with host prefix for allowed IPs
Returns /32 for IPv4 addresses and /128 for IPv6 addresses.
Trait Implementations§
Source§impl Clone for BootstrapConfig
impl Clone for BootstrapConfig
Source§fn clone(&self) -> BootstrapConfig
fn clone(&self) -> BootstrapConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BootstrapConfig
impl Debug for BootstrapConfig
Source§impl<'de> Deserialize<'de> for BootstrapConfig
impl<'de> Deserialize<'de> for BootstrapConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BootstrapConfig
impl RefUnwindSafe for BootstrapConfig
impl Send for BootstrapConfig
impl Sync for BootstrapConfig
impl Unpin for BootstrapConfig
impl UnsafeUnpin for BootstrapConfig
impl UnwindSafe for BootstrapConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more