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,
pub slice_cidr: Option<IpNet>,
}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)
slice_cidr: Option<IpNet>Per-node slice of the cluster CIDR that this node draws container
IPs from. None for pre-slice-aware configs (back-compat). When set,
this replaces node_ip/32 in allowed_ip().
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
When slice_cidr is set, returns the slice CIDR string unchanged so
the overlay accepts the full per-node slice of container IPs. Otherwise
falls back to the legacy /32 (IPv4) or /128 (IPv6) single-host
representation of node_ip for back-compat with pre-slice configs.
Trait Implementations§
Source§impl Clone for BootstrapConfig
impl Clone for BootstrapConfig
Source§fn clone(&self) -> BootstrapConfig
fn clone(&self) -> BootstrapConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more