pub struct InternalAddPeerRequest {
pub wg_public_key: String,
pub overlay_ip: String,
pub endpoint: String,
pub service: Option<String>,
pub service_subnet: Option<String>,
pub candidates: Vec<NatCandidateWire>,
}Expand description
Request to add a WireGuard peer to the local overlay transport.
Sent by the leader to existing nodes when a new node joins the cluster, so that all nodes learn about the new peer without waiting for periodic reconciliation.
Fields§
§wg_public_key: StringNew peer’s WireGuard public key (base64)
overlay_ip: StringNew peer’s overlay IP (e.g. “10.200.0.3”)
endpoint: StringNew peer’s WireGuard endpoint (e.g. “203.0.113.5:51820”)
service: Option<String>When set, this peer is for the named service’s dedicated overlay rather than the global cluster overlay.
service_subnet: Option<String>Service subnet to plumb into the dedicated peer’s AllowedIPs.
candidates: Vec<NatCandidateWire>NAT-traversal candidates the joining node advertises (host /
server-reflexive / relay addresses it can be reached on). The leader
fans these out to existing nodes via /internal/add-peer; each node
hands them to overlayd so NatTraversal::connect_to_peer can
hole-punch / relay toward the new peer when its direct endpoint does not
establish a WireGuard handshake. Empty for a pre-NAT sender;
#[serde(default)] keeps such payloads decoding.
Trait Implementations§
Source§impl Clone for InternalAddPeerRequest
impl Clone for InternalAddPeerRequest
Source§fn clone(&self) -> InternalAddPeerRequest
fn clone(&self) -> InternalAddPeerRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more