use crate::api::Discovery; pub struct DiscoveryClient { host: String, } impl DiscoveryClient { pub fn new(discovery_host: impl Into) -> Self { Self { host: discovery_host.into(), } } pub async fn discover(&self) -> anyhow::Result { tracing::info!( "getting details from discovery endpoint: {}/discovery", self.host.trim_end_matches('/') ); crate::api::Discovery::get_from_host(&self.host).await } }