pub struct Endpoint {
pub kind: String,
pub url: String,
pub priority: i32,
pub health_hint_unix: Option<i64>,
}Expand description
A single way to reach a sender’s data plane.
Fields§
§kind: StringTransport kind. See [Endpoint::KIND_*] constants for known values.
Unknown values are preserved but MUST be skipped by recipients.
url: StringReachable address. Schema is transport-specific:
cloudflare_quick,cloudflare_named,tailscale_funnel,frp:https://host/...iroh:iroh:<NodeID>@<relay_host>:<port>
priority: i32Sender’s preference (lower = try first). Ties broken by array order.
health_hint_unix: Option<i64>Optional last-known-good timestamp (Unix seconds) used by the control plane’s health cache. Absent on fresh endpoints.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub const KIND_CLOUDFLARE_QUICK: &'static str = "cloudflare_quick"
pub const KIND_CLOUDFLARE_QUICK: &'static str = "cloudflare_quick"
Cloudflare Quick Tunnel (*.trycloudflare.com, ephemeral).
Sourcepub const KIND_CLOUDFLARE_NAMED: &'static str = "cloudflare_named"
pub const KIND_CLOUDFLARE_NAMED: &'static str = "cloudflare_named"
Cloudflare Named Tunnel (*.workers.dev or custom hostname, persistent).
Sourcepub const KIND_TAILSCALE_FUNNEL: &'static str = "tailscale_funnel"
pub const KIND_TAILSCALE_FUNNEL: &'static str = "tailscale_funnel"
Tailscale Funnel (public hostname on a tailnet).
Sourcepub const KNOWN_KINDS: &'static [&'static str]
pub const KNOWN_KINDS: &'static [&'static str]
All kinds this crate knows how to reach. Adding a new transport in a later sprint adds a constant here + extends this array.
Sourcepub fn is_known_kind(&self) -> bool
pub fn is_known_kind(&self) -> bool
True if self.kind is in Self::KNOWN_KINDS. Recipients use this
to skip forward-incompatible endpoints without failing the transfer.
Sourcepub fn cloudflare_quick(url: impl Into<String>) -> Self
pub fn cloudflare_quick(url: impl Into<String>) -> Self
Convenience: Cloudflare Quick Tunnel endpoint at priority 0.