Trait kitsune_p2p::KitsuneHost
source · [−]pub trait KitsuneHost: 'static + Send + Sync {
fn get_agent_info_signed(
&self,
input: GetAgentInfoSignedEvt
) -> KitsuneHostResult<'_, Option<AgentInfoSigned>>;
fn peer_extrapolated_coverage(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: DhtArcSet
) -> KitsuneHostResult<'_, Vec<f64>>;
fn record_metrics(
&self,
space: Arc<KitsuneSpace>,
records: Vec<MetricRecord>
) -> KitsuneHostResult<'_, ()>;
}
Expand description
The interface to be implemented by the host, which handles various requests for data
Required Methods
fn get_agent_info_signed(
&self,
input: GetAgentInfoSignedEvt
) -> KitsuneHostResult<'_, Option<AgentInfoSigned>>
fn get_agent_info_signed(
&self,
input: GetAgentInfoSignedEvt
) -> KitsuneHostResult<'_, Option<AgentInfoSigned>>
We need to get previously stored agent info.
fn peer_extrapolated_coverage(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: DhtArcSet
) -> KitsuneHostResult<'_, Vec<f64>>
fn peer_extrapolated_coverage(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: DhtArcSet
) -> KitsuneHostResult<'_, Vec<f64>>
Extrapolated Peer Coverage
fn record_metrics(
&self,
space: Arc<KitsuneSpace>,
records: Vec<MetricRecord>
) -> KitsuneHostResult<'_, ()>
fn record_metrics(
&self,
space: Arc<KitsuneSpace>,
records: Vec<MetricRecord>
) -> KitsuneHostResult<'_, ()>
Record a set of metric records