pub struct ConnectSpec {
pub address: String,
pub ssh: String,
pub identity_file: String,
pub yubaba_port: Option<u16>,
pub yubaba: Option<String>,
}Expand description
Declared reach for a BYO static node (no provider API). Lives under
[connect] in the machine TOML.
Reach only — how the camp gets to the box. Permission is a separate axis that belongs to cheers’ scopes (W295 §“Deliberately deferred”); the two collapse in practice today (mesh membership grants everything) and the data model must not fuse them, so do not add an authorization field here.
address, ssh and identity_file stay whole, literal, operator-authored
strings even though their values often look derived. They are not:
us-west-001 dials SSH over its public IP while us-west-002 was deliberately
repointed at its tailnet IP (R608-F10) precisely because the LAN address is
unreachable off-LAN. Decomposing them into user + host and recomposing
would silently undo per-machine decisions like that one. yubaba is the
field that was derived — mesh IP plus a fixed port, rewritten by
mesh-join — so that is where R707-T1 cut.
Fields§
§address: StringReachable IPv4/host for the box, e.g. "45.32.194.254". Declared: which
of a machine’s several addresses the camp should use is an operator
choice (public IP vs. LAN IP vs. tailnet IP).
ssh: StringSSH target the camp dials for bootstrap + (pre-mesh) tunneled deploys,
e.g. "root@45.32.194.254" or "struc@100.64.0.4". Declared, whole —
see the type doc. Pair with identity_file for a copy-pasteable
ssh -i <identity_file> <ssh>.
identity_file: StringPrivate key path the camp uses to authenticate ssh, e.g.
"~/.ssh/yah". Every node in the fleet uses the same operator key
today, but this is declared per-machine rather than assumed globally
for the same reason ssh is whole rather than decomposed: a future
node with a different key should not have to fight a hardcoded
default. ~ is not shell-expanded by this crate — callers that shell
out to ssh/scp pass it through -i, which expands it itself.
yubaba_port: Option<u16>Port yubaba listens on. Declared reach; defaults to 7443 when omitted,
which is every machine in the fleet today. Composed with the observed
MachineRegistration::mesh_ipv4 by MachineConfig::yubaba_url.
yubaba: Option<String>Explicit yubaba base URL, overriding the composed form.
Two live uses, both genuine declarations: a pre-mesh node saying
"http://127.0.0.1:7443" — “I have no mesh address; reach me through
the SSH tunnel to ssh” — and any node whose yubaba is not at
mesh_ipv4:port. A URL here whose host is a mesh IP is the
pre-R707-T1 shape; MachineConfig::normalize lifts it into
[registration].mesh_ipv4 and clears this field so the two cannot
drift apart.
Implementations§
Source§impl ConnectSpec
impl ConnectSpec
Sourcepub fn yubaba_port(&self) -> u16
pub fn yubaba_port(&self) -> u16
Declared yubaba port, defaulting to DEFAULT_YUBABA_PORT.
Trait Implementations§
Source§impl Clone for ConnectSpec
impl Clone for ConnectSpec
Source§impl Debug for ConnectSpec
impl Debug for ConnectSpec
Source§impl<'de> Deserialize<'de> for ConnectSpec
impl<'de> Deserialize<'de> for ConnectSpec
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 ConnectSpec
impl RefUnwindSafe for ConnectSpec
impl Send for ConnectSpec
impl Sync for ConnectSpec
impl Unpin for ConnectSpec
impl UnsafeUnpin for ConnectSpec
impl UnwindSafe for ConnectSpec
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Fruit for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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