/// Returns a future for all monitoring server listeners.
///
/// Which servers these are, if any, is determined by `config`. The data for
/// monitoring is taken from `history`. As a consequence, if you need new
/// data to be exposed, add it to [`OriginsHistory`] somehow.
///
/// [`OriginsHistory`]: ../origins/struct.OriginsHistory.html
Returns a future for all monitoring server listeners.
Which servers these are, if any, is determined by `config`. The data for
monitoring is taken from `history`. As a consequence, if you need new
data to be exposed, add it to [`OriginsHistory`] somehow.


Returns a future for all monitoring server listeners . Which servers these are if any is determined by ` config ` . The data for monitoring is taken from ` history ` . As a consequence if you need new data to be exposed add it to [ ` OriginsHistory ` ] somehow .
pub fn monitor_listener(
    history: OriginsHistory,
    config: &Config,
) -> impl Future<Item= (), Error = ()> {
    if config.http_listen.is_empty() {
        future::Either::A(future::empty())
    }
    else {
        future::Either::B(
            future::select_all(
                config.http_listen.iter().map(|addr| {
                    http_listener(*addr, history.clone())
                })
            ).then(|_| Ok(()))
        )
    }
}
pub fn monitor_listener ( history : OriginsHistory , config : & Config , ) -> impl Future < Item = ( ) , Error = ( ) > { if config . http_listen . is_empty ( ) { future :: Either :: A ( future :: empty ( ) ) } else { future :: Either :: B ( future :: select_all ( config . http_listen . iter ( ) . map ( | addr | { http_listener ( * addr , history . clone ( ) ) } ) ) . then ( | _ | Ok ( ( ) ) ) ) } }
Returns a future for all monitoring server listeners.
Returns a future for all monitoring server listeners .
history
OriginsHistory
config
&Config