pub struct ServiceInfo {
pub udp_trackers: Vec<String>,
pub https_http_trackers: Vec<String>,
pub direct_http_trackers: Vec<String>,
pub localhost_http_trackers: Vec<LocalhostServiceInfo>,
pub api_endpoint: String,
pub api_uses_https: bool,
pub api_is_localhost_only: bool,
pub health_check_url: String,
pub health_check_uses_https: bool,
pub health_check_is_localhost_only: bool,
pub tls_domains: Vec<TlsDomainInfo>,
}Expand description
Tracker service information for display purposes
This information is available for Released and Running states and shows the tracker services configured for the environment.
Fields§
§udp_trackers: Vec<String>UDP tracker URLs (e.g., udp://10.0.0.1:6969/announce)
https_http_trackers: Vec<String>HTTP tracker URLs with HTTPS via Caddy (e.g., https://http1.tracker.local/announce)
direct_http_trackers: Vec<String>HTTP tracker URLs with direct access (e.g., http://10.0.0.1:7072/announce)
localhost_http_trackers: Vec<LocalhostServiceInfo>HTTP tracker URLs that are localhost-only (internal access via SSH tunnel)
api_endpoint: StringHTTP API endpoint URL (e.g., http://10.0.0.1:1212/api or https://api.tracker.local/api)
api_uses_https: boolWhether the API endpoint uses HTTPS via Caddy
api_is_localhost_only: boolWhether the API endpoint is localhost-only (not externally accessible)
health_check_url: StringHealth check API URL (e.g., http://10.0.0.1:1313/health_check or https://health.tracker.local/health_check)
health_check_uses_https: boolWhether the health check endpoint uses HTTPS via Caddy
health_check_is_localhost_only: boolWhether the health check endpoint is localhost-only (not externally accessible)
tls_domains: Vec<TlsDomainInfo>Domains configured for TLS services (for /etc/hosts hint)
Implementations§
Source§impl ServiceInfo
impl ServiceInfo
Sourcepub fn new(
udp_trackers: Vec<String>,
https_http_trackers: Vec<String>,
direct_http_trackers: Vec<String>,
localhost_http_trackers: Vec<LocalhostServiceInfo>,
api_endpoint: String,
api_uses_https: bool,
api_is_localhost_only: bool,
health_check_url: String,
health_check_uses_https: bool,
health_check_is_localhost_only: bool,
tls_domains: Vec<TlsDomainInfo>,
) -> Self
pub fn new( udp_trackers: Vec<String>, https_http_trackers: Vec<String>, direct_http_trackers: Vec<String>, localhost_http_trackers: Vec<LocalhostServiceInfo>, api_endpoint: String, api_uses_https: bool, api_is_localhost_only: bool, health_check_url: String, health_check_uses_https: bool, health_check_is_localhost_only: bool, tls_domains: Vec<TlsDomainInfo>, ) -> Self
Create a new ServiceInfo
Sourcepub fn from_tracker_config(
tracker_config: &TrackerConfig,
instance_ip: IpAddr,
grafana_config: Option<&GrafanaConfig>,
) -> Self
pub fn from_tracker_config( tracker_config: &TrackerConfig, instance_ip: IpAddr, grafana_config: Option<&GrafanaConfig>, ) -> Self
Build ServiceInfo from tracker configuration and instance IP
This method constructs service URLs by combining the configured bind addresses with the actual instance IP address. It separates HTTP trackers into HTTPS-enabled (via Caddy), direct HTTP access, and localhost-only groups.
§Arguments
tracker_config- The tracker configuration containing service settingsinstance_ip- The IP address of the deployed instancegrafana_config- Optional Grafana configuration (for TLS domain info)
Sourcepub fn has_any_tls(&self) -> bool
pub fn has_any_tls(&self) -> bool
Returns true if any service has TLS enabled
Sourcepub fn has_any_localhost_only(&self) -> bool
pub fn has_any_localhost_only(&self) -> bool
Returns true if any service is localhost-only
Sourcepub fn tls_domain_names(&self) -> Vec<&str>
pub fn tls_domain_names(&self) -> Vec<&str>
Returns all TLS domain names (for /etc/hosts hint)
Sourcepub fn all_domain_names(&self) -> Vec<&str>
pub fn all_domain_names(&self) -> Vec<&str>
Returns all domain names that require DNS records: TLS service domains plus UDP tracker domains (when a domain is explicitly configured).
This is the correct method to use for the provision output domains array
and the DNS setup reminder, because both need to list every hostname the
operator must point at the server IP — including UDP trackers that have a
domain name set.
tls_domain_names() is kept for the HTTPS-specific hint that only lists
TLS-enabled services.
Sourcepub fn unexposed_ports(&self) -> Vec<u16>
pub fn unexposed_ports(&self) -> Vec<u16>
Returns all internal ports that are not exposed due to TLS
Trait Implementations§
Source§impl Clone for ServiceInfo
impl Clone for ServiceInfo
Source§impl Debug for ServiceInfo
impl Debug for ServiceInfo
Auto Trait Implementations§
impl Freeze for ServiceInfo
impl RefUnwindSafe for ServiceInfo
impl Send for ServiceInfo
impl Sync for ServiceInfo
impl Unpin for ServiceInfo
impl UnsafeUnpin for ServiceInfo
impl UnwindSafe for ServiceInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request