Trait holochain_sqlite::store::AsP2pStateTxExt

source ·
pub trait AsP2pStateTxExt {
    // Required methods
    fn p2p_get_agent(
        &self,
        space: Arc<KitsuneSpace>,
        agent: &KitsuneAgent
    ) -> DatabaseResult<Option<AgentInfoSigned>>;
    fn p2p_remove_agent(
        &self,
        space: Arc<KitsuneSpace>,
        agent: &KitsuneAgent
    ) -> DatabaseResult<bool>;
    fn p2p_list_agents(
        &self,
        space: Arc<KitsuneSpace>
    ) -> DatabaseResult<Vec<AgentInfoSigned>>;
    fn p2p_count_agents(&self, space: Arc<KitsuneSpace>) -> DatabaseResult<u32>;
    fn p2p_gossip_query_agents(
        &self,
        space: Arc<KitsuneSpace>,
        since_ms: u64,
        until_ms: u64,
        arcset: DhtArcSet
    ) -> DatabaseResult<Vec<AgentInfoSigned>>;
    fn p2p_query_near_basis(
        &self,
        space: Arc<KitsuneSpace>,
        basis: u32,
        limit: u32
    ) -> DatabaseResult<Vec<AgentInfoSigned>>;
    fn p2p_extrapolated_coverage(
        &self,
        dht_arc_set: DhtArcSet
    ) -> DatabaseResult<Vec<f64>>;
}
Expand description

Extension trait to treat transaction instances as p2p store accessors.

Required Methods§

source

fn p2p_get_agent( &self, space: Arc<KitsuneSpace>, agent: &KitsuneAgent ) -> DatabaseResult<Option<AgentInfoSigned>>

Get an AgentInfoSigned record from the p2p_store

source

fn p2p_remove_agent( &self, space: Arc<KitsuneSpace>, agent: &KitsuneAgent ) -> DatabaseResult<bool>

Remove an agent from the p2p store

source

fn p2p_list_agents( &self, space: Arc<KitsuneSpace> ) -> DatabaseResult<Vec<AgentInfoSigned>>

List all AgentInfoSigned records within a space in the p2p_agent_store

source

fn p2p_count_agents(&self, space: Arc<KitsuneSpace>) -> DatabaseResult<u32>

Count agent records within a space in the p2p_agent_store

source

fn p2p_gossip_query_agents( &self, space: Arc<KitsuneSpace>, since_ms: u64, until_ms: u64, arcset: DhtArcSet ) -> DatabaseResult<Vec<AgentInfoSigned>>

Query agent list for gossip

source

fn p2p_query_near_basis( &self, space: Arc<KitsuneSpace>, basis: u32, limit: u32 ) -> DatabaseResult<Vec<AgentInfoSigned>>

Query agents sorted by nearness to basis loc

source

fn p2p_extrapolated_coverage( &self, dht_arc_set: DhtArcSet ) -> DatabaseResult<Vec<f64>>

Extrapolate coverage from agents within our own storage arc

Implementations on Foreign Types§

source§

impl AsP2pStateTxExt for Transaction<'_>

Implementors§