code: func (c *CheckAlias) processChecks(checks []*structs.HealthCheck) {
  	health := api.HealthPassing
  	msg := "No checks found."
  	for _, chk := range checks {
  		if c.Node != "" && chk.Node != c.Node {
  			continue
  		}
  
  		// We allow ServiceID == "" so that we also check node checks
  		if chk.ServiceID != "" && chk.ServiceID != c.ServiceID {
  			continue
  		}
  
  		if chk.Status == api.HealthCritical || chk.Status == api.HealthWarning {
  			health = chk.Status
  			msg = fmt.Sprintf("Aliased check %q failing: %s", chk.Name, chk.Output)
  
  			// Critical checks exit the for loop immediately since we
  			// know that this is the health state. Warnings do not since
  			// there may still be a critical check.
  			if chk.Status == api.HealthCritical {
  				break
  			}
  		}
  
  		msg = "All checks passing."
  	}
  
  	// Update our check value
  	c.Notify.UpdateCheck(c.CheckID, health, msg)
  }
docs: // processChecks is a common helper for taking a set of health checks and
  // using them to update our alias. This is abstracted since the checks can
  // come from both the remote server as well as local state.