Struct cashweb_keyserver_client::KeyserverManager[][src]

pub struct KeyserverManager<S> { /* fields omitted */ }

KeyserverManager wraps a client and allows sampling and selecting of queries across a set of keyservers.

Implementations

impl<S> KeyserverManager<S>[src]

pub fn from_service(service: S, uris: Vec<Uri>) -> Self[src]

Creates a new manager from URIs and a client.

pub fn get_uris(&self) -> Arc<RwLock<Vec<Uri>>>[src]

Get shared reference the Uris.

pub fn into_client(self) -> KeyserverClient<S>[src]

Converts the manager into the underlying client.

impl KeyserverManager<HyperClient<HttpConnector>>[src]

pub fn new(uris: Vec<String>) -> Result<Self, InvalidUri>[src]

Create a HTTP manager.

impl<S> KeyserverManager<S> where
    S: Service<Request<Body>, Response = Response<Body>>,
    S: Send + Clone + 'static,
    S::Future: Send,
    S::Error: Debug + Display + Send
[src]

pub async fn uniform_sample_metadata(
    &self,
    address: &str,
    sample_size: usize
) -> Result<SampleResponse<MetadataPackage, <KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetMetadata)>>::Error>>
[src]

Perform a uniform sample of metadata over keyservers and select the latest.

pub async fn collect_peers(
    &self
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
[src]

Collect all peers from keyservers.

pub async fn crawl_peers(
    &self
) -> Result<AggregateResponse<Peers, <KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, GetPeers)>>::Error>>
[src]

Crawl peers.

pub async fn uniform_broadcast_metadata(
    &self,
    address: &str,
    auth_wrapper: AuthWrapper,
    token: String,
    sample_size: usize
) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
[src]

Perform a uniform broadcast of metadata over keyservers and select the latest.

pub async fn uniform_broadcast_raw_metadata(
    &self,
    address: &str,
    raw_auth_wrapper: Vec<u8>,
    token: String,
    sample_size: usize
) -> Result<AggregateResponse<(), <KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>, SampleError<<KeyserverClient<S> as Service<(Uri, PutMetadata)>>::Error>>
[src]

Perform a uniform broadcast of raw metadata over keyservers and select the latest.

Trait Implementations

impl<S: Clone> Clone for KeyserverManager<S>[src]

impl<S: Debug> Debug for KeyserverManager<S>[src]

Auto Trait Implementations

impl<S> !RefUnwindSafe for KeyserverManager<S>[src]

impl<S> Send for KeyserverManager<S> where
    S: Send
[src]

impl<S> Sync for KeyserverManager<S> where
    S: Sync
[src]

impl<S> Unpin for KeyserverManager<S> where
    S: Unpin
[src]

impl<S> !UnwindSafe for KeyserverManager<S>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,