code: func (c *Cloud) getExpectedHealthCheck(target string, annotations map[string]string) (*elb.HealthCheck, error) {
  	healthcheck := &elb.HealthCheck{Target: &target}
  	getOrDefault := func(annotation string, defaultValue int64) (*int64, error) {
  		i64 := defaultValue
  		var err error
  		if s, ok := annotations[annotation]; ok {
  			i64, err = strconv.ParseInt(s, 10, 0)
  			if err != nil {
  				return nil, fmt.Errorf("failed parsing health check annotation value: %v", err)
  			}
  		}
  		return &i64, nil
  	}
  	var err error
  	healthcheck.HealthyThreshold, err = getOrDefault(ServiceAnnotationLoadBalancerHCHealthyThreshold, defaultHCHealthyThreshold)
  	if err != nil {
  		return nil, err
  	}
  	healthcheck.UnhealthyThreshold, err = getOrDefault(ServiceAnnotationLoadBalancerHCUnhealthyThreshold, defaultHCUnhealthyThreshold)
  	if err != nil {
  		return nil, err
  	}
  	healthcheck.Timeout, err = getOrDefault(ServiceAnnotationLoadBalancerHCTimeout, defaultHCTimeout)
  	if err != nil {
  		return nil, err
  	}
  	healthcheck.Interval, err = getOrDefault(ServiceAnnotationLoadBalancerHCInterval, defaultHCInterval)
  	if err != nil {
  		return nil, err
  	}
  	if err = healthcheck.Validate(); err != nil {
  		return nil, fmt.Errorf("some of the load balancer health check parameters are invalid: %v", err)
  	}
  	return healthcheck, nil
  }
docs: // getExpectedHealthCheck returns an elb.Healthcheck for the provided target
  // and using either sensible defaults or overrides via Service annotations