// SetHealthCheck sets the HealthCheck field's value.
5607
func (s *GetHealthCheckOutput) SetHealthCheck(v *HealthCheck) *GetHealthCheckOutput {
	s.HealthCheck = v
	return s
}
494745
func (p *PodContainer) SetHealthCheck(healthcheck *PodHealthCheck) *PodContainer {
	p.HealthCheck = healthcheck
	return p
}
96316
func (s *EnvironmentDescription) SetHealth(v string) *EnvironmentDescription {
	s.Health = &v
	return s
}
920617
func (s *HealthCheck) SetHealthCheckVersion(v int64) *HealthCheck {
	s.HealthCheckVersion = &v
	return s
}
1004416
func SetHealthcheckInterval(interval time.Duration) ClientOptionFunc {
	return func(c *Client) error {
		c.healthcheckInterval = interval
		return nil
	}
}
1272628
func (s *UpdateEndpointGroupInput) SetHealthCheckProtocol(v string) *UpdateEndpointGroupInput {
	s.HealthCheckProtocol = &v
	return s
}
1055671
func (s *ModifyTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *ModifyTargetGroupInput {
	s.HealthCheckIntervalSeconds = &v
	return s
}
293830
func (s *ResourceRecordSet) SetHealthCheckId(v string) *ResourceRecordSet {
	s.HealthCheckId = &v
	return s
}
1184081
func (s *AgentInfo) SetHealth(v string) *AgentInfo {
	s.Health = &v
	return s
}
1217115
func (s *Instance) SetHealthStatus(v string) *Instance {
	s.HealthStatus = &v
	return s
}
407737
func (s *TargetGroup) SetHealthCheckProtocol(v string) *TargetGroup {
	s.HealthCheckProtocol = &v
	return s
}
839768
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()
	}
}
575963
func (s *CreateTargetGroupInput) SetHealthCheckPath(v string) *CreateTargetGroupInput {
	s.HealthCheckPath = &v
	return s
}
896741
func (s *UpdateEndpointGroupInput) SetHealthCheckIntervalSeconds(v int64) *UpdateEndpointGroupInput {
	s.HealthCheckIntervalSeconds = &v
	return s
}
745614
func (s *CreateEndpointGroupInput) SetHealthCheckProtocol(v string) *CreateEndpointGroupInput {
	s.HealthCheckProtocol = &v
	return s
}
405391
func (s *CreateTargetGroupInput) SetHealthCheckPort(v string) *CreateTargetGroupInput {
	s.HealthCheckPort = &v
	return s
}
74003
func (s *CreateTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateTargetGroupInput {
	s.HealthCheckIntervalSeconds = &v
	return s
}