code: func (hc *Check) healthcheck() {
  	if hc.Checker == nil {
  		return
  	}
  	start := time.Now()
  	result := hc.execute()
  
  	status := "SUCCESS"
  	if !result.Success {
  		status = "FAILURE"
  	}
  	log.Infof("%d: (%s) %s: %v", hc.Id, hc, status, result)
  
  	hc.lock.Lock()
  
  	hc.start = start
  	hc.result = result
  
  	var state State
  	if result.Success {
  		state = StateHealthy
  		hc.failed = 0
  		hc.successes++
  	} else {
  		hc.failed++
  		hc.failures++
  		state = StateUnhealthy
  	}
  
  	if hc.state == StateHealthy && hc.failed > 0 && hc.failed <= uint64(hc.Config.Retries) {
  		log.Infof("%d: Failure %d - retrying...", hc.Id, hc.failed)
  		state = StateHealthy
  	}
  	transition := (hc.state != state)
  	hc.state = state
  
  	hc.lock.Unlock()
  
  	if transition {
  		hc.Notify()
  	}
  }
docs: // healthcheck executes the given checker.