Trait noxious::proxy::Runner[][src]

pub trait Runner {
#[must_use]    fn initialize_proxy<'async_trait, Listener>(
        config: ProxyConfig,
        initial_toxics: Toxics
    ) -> Pin<Box<dyn Future<Output = Result<(Listener, SharedProxyInfo)>> + Send + 'async_trait>>
    where
        Listener: SocketListener + 'static,
        Listener: 'async_trait
;
#[must_use] fn run_proxy<'async_trait, Listener>(
        listener: Listener,
        proxy_info: SharedProxyInfo,
        receiver: RequestReceiver<ToxicEvent, ToxicEventResult>,
        stop: Stop,
        closer: Closer
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Listener: SocketListener + 'static,
        Listener: 'async_trait
; }

The proxy runner interface (defined for mocking, mainly)

Required methods

#[must_use]fn initialize_proxy<'async_trait, Listener>(
    config: ProxyConfig,
    initial_toxics: Toxics
) -> Pin<Box<dyn Future<Output = Result<(Listener, SharedProxyInfo)>> + Send + 'async_trait>> where
    Listener: SocketListener + 'static,
    Listener: 'async_trait, 
[src]

Initialize a proxy, bind to a TCP port but don’t start accepting clients

#[must_use]fn run_proxy<'async_trait, Listener>(
    listener: Listener,
    proxy_info: SharedProxyInfo,
    receiver: RequestReceiver<ToxicEvent, ToxicEventResult>,
    stop: Stop,
    closer: Closer
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    Listener: SocketListener + 'static,
    Listener: 'async_trait, 
[src]

Run the initialized proxy, accept clients, establish links

Loading content...

Implementors

impl Runner for ProxyRunner[src]

fn initialize_proxy<'async_trait, Listener>(
    config: ProxyConfig,
    initial_toxics: Toxics
) -> Pin<Box<dyn Future<Output = Result<(Listener, SharedProxyInfo)>> + Send + 'async_trait>> where
    Listener: SocketListener + 'static,
    Listener: 'async_trait, 
[src]

Initialize a proxy, bind to a TCP port but don’t start accepting clients

fn run_proxy<'async_trait, Listener>(
    listener: Listener,
    proxy_info: SharedProxyInfo,
    receiver: RequestReceiver<ToxicEvent, ToxicEventResult>,
    stop: Stop,
    closer: Closer
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    Listener: SocketListener + 'static,
    Listener: 'async_trait, 
[src]

Run the initialized proxy, accept clients, establish links

Loading content...