pub struct ServeArgs {
pub http: String,
pub tailscale: bool,
pub open: bool,
pub poll_interval: u64,
}Expand description
Arguments for trusty-console serve.
Why: The bind address must be configurable so users can change the port when
7788 is taken; --open is a convenience for developers; --poll-interval
lets operators tune the background health-poll frequency; --tailscale
enables durable tailnet exposure without requiring --http 0.0.0.0.
What: Optional --http (default 127.0.0.1:7788), --open,
--poll-interval, and --tailscale flags.
Env overrides: TRUSTY_CONSOLE_BIND sets the default bind mode so a
supervised/relaunched daemon stays tailnet-reachable without extra flags.
Test: Default address tested in test_serve_args_defaults below.
Fields§
§http: StringAddress to listen on (default: 127.0.0.1:7788).
Takes precedence over –tailscale and TRUSTY_CONSOLE_BIND when set to a non-default value.
tailscale: boolExpose the console on both 127.0.0.1 and the machine’s Tailscale IPv4, enabling tailnet clients to reach the console without LAN exposure.
The Tailscale IP is detected via tailscale ip -4. If Tailscale is not
running, prints a warning and falls back to localhost-only.
Can also be set persistently via the TRUSTY_CONSOLE_BIND=tailscale env var so a supervised/relaunched console stays tailnet-reachable without manually passing this flag.
open: boolOpen the console in the default browser after starting.
poll_interval: u64Background poll interval in seconds (default: 15).
Controls BOTH the health poller (poller::start) AND the metrics
poller (metrics_poller::start). Increasing this value reduces the
frequency of both the HTTP health checks against each connector AND
the stdio MCP console_metrics tool calls against trusty-analyze.
Trait Implementations§
Source§impl Args for ServeArgs
impl Args for ServeArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for ServeArgs
impl CommandFactory for ServeArgs
Source§impl FromArgMatches for ServeArgs
impl FromArgMatches for ServeArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for ServeArgs
impl Parser for ServeArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for ServeArgs
impl RefUnwindSafe for ServeArgs
impl Send for ServeArgs
impl Sync for ServeArgs
impl Unpin for ServeArgs
impl UnsafeUnpin for ServeArgs
impl UnwindSafe for ServeArgs
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
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