pub struct ControlRunner { /* private fields */ }Expand description
Actor responsible for maintaining the connection to control.
This actor is responsible for proxying the map response stream onto the message bus.
Implementations§
Source§impl ControlRunner
impl ControlRunner
Sourcepub fn ipv4(
&self,
ctx: &mut Context<Self, DelegatedReply<Option<Ipv4Addr>>>,
) -> DelegatedReply<Option<Ipv4Addr>>
pub fn ipv4( &self, ctx: &mut Context<Self, DelegatedReply<Option<Ipv4Addr>>>, ) -> DelegatedReply<Option<Ipv4Addr>>
Fetch the IPv4 address for this tailscale device.
Sourcepub fn ipv6(
&self,
ctx: &mut Context<Self, DelegatedReply<Option<Ipv6Addr>>>,
) -> DelegatedReply<Option<Ipv6Addr>>
pub fn ipv6( &self, ctx: &mut Context<Self, DelegatedReply<Option<Ipv6Addr>>>, ) -> DelegatedReply<Option<Ipv6Addr>>
Fetch the IPv6 address for this tailscale device.
Sourcepub fn self_node(
&self,
ctx: &mut Context<Self, DelegatedReply<Option<Node>>>,
) -> DelegatedReply<Option<Node>>
pub fn self_node( &self, ctx: &mut Context<Self, DelegatedReply<Option<Node>>>, ) -> DelegatedReply<Option<Node>>
Fetch the self node for this tailscale device.
Sourcepub fn current_ssh_policy(&self) -> Option<SshPolicy>
pub fn current_ssh_policy(&self) -> Option<SshPolicy>
Fetch the current Tailscale SSH policy, if control has pushed one.
Returns None when control has not sent an SSH policy (the SSH server treats this as
deny-all — fail-closed). Unlike self_node this does not block waiting
for a value: an absent policy is a legitimate, immediate answer.
Sourcepub fn current_tka_status(&self) -> Option<TkaStatus>
pub fn current_tka_status(&self) -> Option<TkaStatus>
Fetch the current Tailnet Lock status, if control has pushed one.
Returns None when control has sent no TKAInfo (tailnet lock not in use / no change seen).
Sourcepub fn cert_domains(&self) -> Vec<String>
pub fn cert_domains(&self) -> Vec<String>
The cert-eligible DNS names from control’s netmap DNS config (Go nm.DNS.CertDomains).
Returns an empty Vec when control has sent no DNS config, or one carrying no cert
domains (an empty list is a legitimate, immediate answer — like current_ssh_policy, this
does not block waiting for a value).
Sourcepub fn dns_config(&self) -> Option<DnsConfig>
pub fn dns_config(&self) -> Option<DnsConfig>
The full DNS config from control’s netmap (Go netmap.NetworkMap.DNS), or None when
control has sent no DNS config yet. An immediate answer (does not block); the facade
surfaces this for Device::dns_config (the daemon’s tnet dns status).
Sourcepub fn pop_browser_url(&self) -> Option<Url>
pub fn pop_browser_url(&self) -> Option<Url>
The interactive-login / consent URL control last asked this node to open
(MapResponse.PopBrowserURL), or None when control has sent none. An immediate answer
(does not block); the facade surfaces this for Device::pop_browser_url.
Sourcepub fn netcheck(&self) -> NetcheckReport
pub fn netcheck(&self) -> NetcheckReport
The latest network-conditions report (preferred DERP region + per-region latencies). An
immediate answer (does not block); empty before the first DERP-latency measurement. The
facade surfaces this for Device::netcheck (the daemon’s tnet netcheck).
Sourcepub fn fetch_id_token(
&self,
ctx: &mut Context<Self, DelegatedReply<Result<String, IdTokenError>>>,
audience: String,
) -> DelegatedReply<Result<String, IdTokenError>>
pub fn fetch_id_token( &self, ctx: &mut Context<Self, DelegatedReply<Result<String, IdTokenError>>>, audience: String, ) -> DelegatedReply<Result<String, IdTokenError>>
Request an OIDC ID token from control scoped to audience (workload-identity federation).
Opens a fresh Noise channel and POSTs /machine/id-token; returns the signed JWT or an
IdTokenError. Runs on a spawned task (delegated reply) so the actor mailbox isn’t blocked
for the round-trip.
Sourcepub fn logout(
&self,
ctx: &mut Context<Self, DelegatedReply<Result<(), LogoutError>>>,
) -> DelegatedReply<Result<(), LogoutError>>
pub fn logout( &self, ctx: &mut Context<Self, DelegatedReply<Result<(), LogoutError>>>, ) -> DelegatedReply<Result<(), LogoutError>>
Log this node out of the tailnet: deregister it by expiring its current node key.
Mirrors fetch_id_token: clones the control config + node keys
into a spawned task (delegated reply, so the round-trip doesn’t block the mailbox) and
re-POSTs /machine/register with a past expiry over a fresh Noise channel. This is a
control-plane state change only — it does NOT stop this actor or tear down the datapath
(the caller follows up with the normal runtime shutdown), and it does not touch the
on-disk node key, so re-registering with the same key is the re-login path.
Sourcepub fn set_dns(
&self,
ctx: &mut Context<Self, DelegatedReply<Result<(), SetDnsError>>>,
name: String,
value: String,
) -> DelegatedReply<Result<(), SetDnsError>>
pub fn set_dns( &self, ctx: &mut Context<Self, DelegatedReply<Result<(), SetDnsError>>>, name: String, value: String, ) -> DelegatedReply<Result<(), SetDnsError>>
Publish a DNS record for this node via control’s /machine/set-dns (Go
LocalClient.SetDNS).
Mirrors fetch_id_token: clones the control config + node keys
into a spawned task (delegated reply, so the round-trip doesn’t block the mailbox) and
POSTs the record over a fresh Noise channel. Go’s SetDNS is TXT-only (its sole use is
the ACME DNS-01 _acme-challenge record); the record type is fixed to "TXT" here to
match, so the surfaced API takes only name + value.
Trait Implementations§
Source§impl Actor for ControlRunner
impl Actor for ControlRunner
Source§async fn on_start(
params: Params,
slf: ActorRef<Self>,
) -> Result<Self, Self::Error>
async fn on_start( params: Params, slf: ActorRef<Self>, ) -> Result<Self, Self::Error>
Source§fn name() -> &'static str
fn name() -> &'static str
Source§fn on_message(
&mut self,
msg: Box<dyn DynMessage<Self>>,
actor_ref: ActorRef<Self>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &mut bool,
) -> impl Future<Output = Result<(), Box<dyn ReplyError>>> + Send
fn on_message( &mut self, msg: Box<dyn DynMessage<Self>>, actor_ref: ActorRef<Self>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &mut bool, ) -> impl Future<Output = Result<(), Box<dyn ReplyError>>> + Send
Source§fn on_panic(
&mut self,
actor_ref: WeakActorRef<Self>,
err: PanicError,
) -> impl Future<Output = Result<ControlFlow<ActorStopReason>, Self::Error>> + Send
fn on_panic( &mut self, actor_ref: WeakActorRef<Self>, err: PanicError, ) -> impl Future<Output = Result<ControlFlow<ActorStopReason>, Self::Error>> + Send
Source§fn on_link_died(
&mut self,
actor_ref: WeakActorRef<Self>,
id: ActorId,
reason: ActorStopReason,
) -> impl Future<Output = Result<ControlFlow<ActorStopReason>, Self::Error>> + Send
fn on_link_died( &mut self, actor_ref: WeakActorRef<Self>, id: ActorId, reason: ActorStopReason, ) -> impl Future<Output = Result<ControlFlow<ActorStopReason>, Self::Error>> + Send
Source§fn on_stop(
&mut self,
actor_ref: WeakActorRef<Self>,
reason: ActorStopReason,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn on_stop( &mut self, actor_ref: WeakActorRef<Self>, reason: ActorStopReason, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Source§fn next(
&mut self,
actor_ref: WeakActorRef<Self>,
mailbox_rx: &mut MailboxReceiver<Self>,
) -> impl Future<Output = Option<Signal<Self>>> + Send
fn next( &mut self, actor_ref: WeakActorRef<Self>, mailbox_rx: &mut MailboxReceiver<Self>, ) -> impl Future<Output = Option<Signal<Self>>> + Send
Source§impl Message<CertDomains> for ControlRunner
impl Message<CertDomains> for ControlRunner
Source§impl Message<CurrentSshPolicy> for ControlRunner
impl Message<CurrentSshPolicy> for ControlRunner
Source§impl Message<CurrentTkaStatus> for ControlRunner
impl Message<CurrentTkaStatus> for ControlRunner
Source§impl Message<DnsConfig> for ControlRunner
impl Message<DnsConfig> for ControlRunner
Source§impl Message<FetchIdToken> for ControlRunner
impl Message<FetchIdToken> for ControlRunner
Source§type Reply = DelegatedReply<Result<String, IdTokenError>>
type Reply = DelegatedReply<Result<String, IdTokenError>>
Source§impl Message<Ipv4> for ControlRunner
impl Message<Ipv4> for ControlRunner
Source§impl Message<Ipv6> for ControlRunner
impl Message<Ipv6> for ControlRunner
Source§impl Message<Logout> for ControlRunner
impl Message<Logout> for ControlRunner
Source§impl Message<Netcheck> for ControlRunner
impl Message<Netcheck> for ControlRunner
Source§impl Message<PopBrowserUrl> for ControlRunner
impl Message<PopBrowserUrl> for ControlRunner
Source§impl Message<SelfNode> for ControlRunner
impl Message<SelfNode> for ControlRunner
Source§impl Message<SetAdvertiseRoutes> for ControlRunner
impl Message<SetAdvertiseRoutes> for ControlRunner
Source§impl Message<SetDns> for ControlRunner
impl Message<SetDns> for ControlRunner
Source§impl Message<StreamMessage<Arc<StateUpdate>, (), ()>> for ControlRunner
impl Message<StreamMessage<Arc<StateUpdate>, (), ()>> for ControlRunner
Auto Trait Implementations§
impl !RefUnwindSafe for ControlRunner
impl !UnwindSafe for ControlRunner
impl Freeze for ControlRunner
impl Send for ControlRunner
impl Sync for ControlRunner
impl Unpin for ControlRunner
impl UnsafeUnpin for ControlRunner
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> 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<A, T> DynMessage<A> for T
impl<A, T> DynMessage<A> for T
Source§fn handle_dyn<'a>(
self: Box<T>,
state: &'a mut A,
actor_ref: ActorRef<A>,
tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>,
stop: &'a mut bool,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
fn handle_dyn<'a>( self: Box<T>, state: &'a mut A, actor_ref: ActorRef<A>, tx: Option<Sender<Result<Box<dyn Any + Send>, SendError<Box<dyn Any + Send>, Box<dyn Any + Send>>>>>, stop: &'a mut bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn ReplyError>>> + Send + 'a>>
impl<T> ErasedDestructor for Twhere
T: 'static,
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