PingoraLnClientPool

Trait PingoraLnClientPool 

Source
pub trait PingoraLnClientPool {
    type Error: Error + Send + Sync + 'static + HasServiceErrorSource;
    type Key: Hash + Eq + Send + Sync + 'static;

    // Required methods
    fn get_invoice<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        offer: &'life1 Offer,
        key: &'life2 Self::Key,
        amount_msat: Option<u64>,
        expiry_secs: Option<u64>,
    ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_metrics<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 Self::Key,
    ) -> Pin<Box<dyn Future<Output = Result<PingoraLnMetrics, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn connect(
        &self,
        key: Self::Key,
        backend: &DiscoveryBackend,
    ) -> Result<(), Self::Error>;
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static + HasServiceErrorSource

Source

type Key: Hash + Eq + Send + Sync + 'static

Required Methods§

Source

fn get_invoice<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, offer: &'life1 Offer, key: &'life2 Self::Key, amount_msat: Option<u64>, expiry_secs: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_metrics<'life0, 'life1, 'async_trait>( &'life0 self, key: &'life1 Self::Key, ) -> Pin<Box<dyn Future<Output = Result<PingoraLnMetrics, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn connect( &self, key: Self::Key, backend: &DiscoveryBackend, ) -> Result<(), Self::Error>

Implementors§