pub fn check_repeatedly(self) -> impl Future<Item = (), Error = ()> {
        future::loop_fn(self, move |state| {
            // TODO (CM): If we wanted to keep track of how many times
            // a health check has failed in the past X executions, or
            // do similar historical tracking, here's where we'd do
            // it.
            let service_group = state.service_group.clone();
            state.clone().single_iteration().then(move |res| {
                                                if res.is_ok() {
                                                    trace!("Health check future for {} \
                                                            succeeded; continuing loop",
                                                           service_group);
                                                    Ok(Loop::Continue(state))
                                                } else {
                                                    trace!("Health check future for {} failed \
                                                            failed; continuing loop.",
                                                           service_group);
                                                    Ok(Loop::Continue(state))
                                                }
                                            })
        })
    }
/// Repeatedly runs a health check, followed by an appropriate
/// delay, forever.
Repeatedly runs a health check, followed by an appropriate
delay, forever.
Repeatedly runs a health check followed by an appropriate delay forever .
pub fn check_repeatedly(self) -> impl Future<Item = (), Error = ()> {
        future::loop_fn(self, move |state| {
            // TODO (CM): If we wanted to keep track of how many times
            // a health check has failed in the past X executions, or
            // do similar historical tracking, here's where we'd do
            // it.
            let service_group = state.service_group.clone();
            state.clone().single_iteration().then(move |res| {
                                                if res.is_ok() {
                                                    trace!("Health check future for {} \
                                                            succeeded; continuing loop",
                                                           service_group);
                                                    Ok(Loop::Continue(state))
                                                } else {
                                                    trace!("Health check future for {} failed \
                                                            failed; continuing loop.",
                                                           service_group);
                                                    Ok(Loop::Continue(state))
                                                }
                                            })
        })
    }
pub fn check_repeatedly ( self ) -> impl Future < Item = ( ) , Error = ( ) > { future :: loop_fn ( self , move | state | { // TODO (CM): If we wanted to keep track of how many times // a health check has failed in the past X executions, or // do similar historical tracking, here's where we'd do // it. let service_group = state . service_group . clone ( ) ; state . clone ( ) . single_iteration ( ) . then ( move | res | { if res . is_ok ( ) { trace ! ( " \
 " service_group ) ; Ok ( Loop :: Continue ( state ) ) } else { trace ! ( " \
 " service_group ) ; Ok ( Loop :: Continue ( state ) ) } } ) } ) }
Repeatedly runs a health check, followed by an appropriate
delay, forever.
Repeatedly runs a health check followed by an appropriate delay forever .
self
self