pub struct RelayClient { /* private fields */ }Expand description
Beacon Atlas relay client.
Provides registration, heartbeat, discovery, and SEO stats.
Implementations§
Source§impl RelayClient
impl RelayClient
Sourcepub fn new(base_url: &str) -> Self
pub fn new(base_url: &str) -> Self
Create a new relay client pointing at the given base URL.
Default relay: https://rustchain.org
Sourcepub fn register(
&self,
name: &str,
provider: &str,
capabilities: &[&str],
) -> Result<Registration>
pub fn register( &self, name: &str, provider: &str, capabilities: &[&str], ) -> Result<Registration>
Register a new agent on the relay.
Returns agent_id and relay_token for subsequent heartbeats.
Sourcepub fn heartbeat(&self, agent_id: &str, token: &str) -> Result<Heartbeat>
pub fn heartbeat(&self, agent_id: &str, token: &str) -> Result<Heartbeat>
Send a standard heartbeat.
Sourcepub fn heartbeat_seo(
&self,
agent_id: &str,
token: &str,
seo_url: Option<&str>,
seo_description: Option<&str>,
) -> Result<Heartbeat>
pub fn heartbeat_seo( &self, agent_id: &str, token: &str, seo_url: Option<&str>, seo_description: Option<&str>, ) -> Result<Heartbeat>
Send an SEO-enhanced heartbeat with optional dofollow URL.
Sourcepub fn seo_stats(&self, agent_id: &str) -> Result<SeoStats>
pub fn seo_stats(&self, agent_id: &str) -> Result<SeoStats>
Get SEO stats for a specific agent.
Sourcepub fn seo_report(&self) -> Result<SeoReport>
pub fn seo_report(&self) -> Result<SeoReport>
Get aggregate SEO report for the network.
Sourcepub fn discover(&self, include_dead: bool) -> Result<Vec<DiscoveredAgent>>
pub fn discover(&self, include_dead: bool) -> Result<Vec<DiscoveredAgent>>
Discover all agents on the relay.
Sourcepub fn agent_profile_json(&self, agent_id: &str) -> Result<Value>
pub fn agent_profile_json(&self, agent_id: &str) -> Result<Value>
Fetch an agent’s profile in JSON format (GPT-optimized).
Sourcepub fn agent_profile_xml(&self, agent_id: &str) -> Result<String>
pub fn agent_profile_xml(&self, agent_id: &str) -> Result<String>
Fetch an agent’s profile in XML format (Claude-optimized).
Auto Trait Implementations§
impl Freeze for RelayClient
impl !RefUnwindSafe for RelayClient
impl Send for RelayClient
impl Sync for RelayClient
impl Unpin for RelayClient
impl UnsafeUnpin for RelayClient
impl !UnwindSafe for RelayClient
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
Mutably borrows from an owned value. Read more