// Check the service once every waitTimePerCycle millisecond until timeout.
// Default timeout is totalWaitTime seconds.
Check the service once every waitTimePerCycle millisecond until timeout.
Default timeout is totalWaitTime seconds.
// Check the service once every waitTimePerCycle millisecond until timeout . // Default timeout is totalWaitTime seconds .
func ProbeHttpService(service model.Service, path string) bool {
	log.Printf("probing service %v", service.Id)
	timeOutChan := make(chan string)
	serviceUpChan := make(chan string)
	go probeHttpService(service, path, timeOutChan, serviceUpChan)
	select {
	case <-serviceUpChan:
		return true 
	case <-time.After(totalProbeTime):
		close(timeOutChan) 
		return false
	}
}
func ProbeHttpService ( service model . Service , path string ) bool { log . Printf ( " " , service . Id ) timeOutChan := make ( chan string ) serviceUpChan := make ( chan string ) go probeHttpService ( service , path , timeOutChan , serviceUpChan ) select { case <- serviceUpChan : return true case <- time . After ( totalProbeTime ) : close ( timeOutChan ) return false } }
Check the service once every waitTimePerCycle millisecond until timeout.
Check the service once every waitTimePerCycle millisecond until timeout .
//Service is up. //Timeout is reached. Stop waiting.