pub trait MeshHost: Send + Sync {
// Required methods
fn status_json<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ensure_funnel<'life0, 'async_trait>(
&'life0 self,
port: u16,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn funnel_url<'life0, 'async_trait>(
&'life0 self,
port: u16,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The kernel-side couplings this crate needs but cannot own: the three
tailscale/tailscaled process shell-outs (the “what runs” half of the mesh,
a Sidecar in Core). Core implements this in apps/core/src/mesh_host.rs and
installs it once at boot via set_global_host.
Every method is only ever called when the mesh is enabled
(RYU_MESH_ENABLED); the disabled paths short-circuit before the host is
consulted, so a process that never installs a host still runs the default
(mesh-off) install correctly.
Required Methods§
Sourcefn status_json<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status_json<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run tailscale status --json and return the parsed JSON. Errors when the
daemon is absent or returns non-JSON (the caller maps that to an
enabled-but-unreachable status).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".