#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IcDashboardRequest {
pub source_endpoint: String,
pub now_unix_secs: u64,
}
impl IcDashboardRequest {
#[must_use]
pub fn new(source_endpoint: impl Into<String>, now_unix_secs: u64) -> Self {
Self {
source_endpoint: source_endpoint.into(),
now_unix_secs,
}
}
#[cfg(feature = "dashboard-host")]
#[must_use]
pub fn source_request(&self) -> crate::ic::IcSourceRequest {
crate::ic::IcSourceRequest::new(
&self.source_endpoint,
crate::subnet_catalog::format_utc_timestamp_secs(self.now_unix_secs),
"ic-query",
)
}
}