use crate::dht::dht_event::{DhtEvent, PeerHoldRequestData};
use lib3h_protocol::{AddressRef, DidWork, Lib3hResult};
pub trait Dht {
fn get_peer(&self, peer_address: &str) -> Option<PeerHoldRequestData>;
fn fetch_peer(&self, peer_address: &str) -> Option<PeerHoldRequestData>;
fn drop_peer(&self, peer_address: &str) -> Lib3hResult<()>;
fn get_data(&self, data_address: &AddressRef) -> Lib3hResult<Vec<u8>>;
fn fetch_data(&self, data_address: &AddressRef) -> Lib3hResult<Vec<u8>>;
fn post(&mut self, evt: DhtEvent) -> Lib3hResult<()>;
fn process(&mut self) -> Lib3hResult<(DidWork, Vec<DhtEvent>)>;
fn this_peer(&self) -> Lib3hResult<()>;
}