// IsHealthy returns if the allocation is marked as healthy as part of a
// deployment
967700
func (a *AllocDeploymentStatus) IsHealthy() bool {
	if a == nil {
		return false
	}

	return a.Healthy != nil && *a.Healthy
}
999456
func (s *TargetGroup) SetHealthCheckEnabled(v bool) *TargetGroup {
	s.HealthCheckEnabled = &v
	return s
}
107703
func (s *DescribeEnvironmentHealthOutput) SetHealthStatus(v string) *DescribeEnvironmentHealthOutput {
	s.HealthStatus = &v
	return s
}
1350820
func (t *Transport) HealthCheck(ctx context.Context, id uint64) error {
	t.mu.Lock()
	p, ok := t.peers[id]
	t.mu.Unlock()
	if !ok {
		return ErrIsNotFound
	}
	ctx, cancel := t.withContext(ctx)
	defer cancel()
	return p.healthCheck(ctx)
}
847211
func (hc *TLSHealthChecker) Healthy() error {
	if hc.cert == nil {
		return notFoundError
	}
	if hc.cert.NotBefore.After(time.Now()) {
		return notStartedError
	}
	if hc.cert.NotAfter.Before(time.Now().Add(hc.dur)) {
		return shortLifeError
	}
	return nil
}
853927
func (c *CommunityHealthMetrics) GetHealthPercentage() int {
	if c == nil || c.HealthPercentage == nil {
		return 0
	}
	return *c.HealthPercentage
}
196398
func (r *StandardRegistry) RunHealthchecks() {
	r.mutex.Lock()
	defer r.mutex.Unlock()
	for _, i := range r.metrics {
		if h, ok := i.(Healthcheck); ok {
			h.Check()
		}
	}
}
298989
func HealthCheck() http.Handler {
	r := mux.NewRouter()
	r.HandleFunc("/health", func(w http.ResponseWriter, req *http.Request) {
		w.Write([]byte("Healthy!\n"))
	})
	return r
}
1338013
func supportsNodesHealthCheck(nodes []*v1.Node) bool {
	for _, node := range nodes {
		if !isAtLeastMinNodesHealthCheckVersion(node.Status.NodeInfo.KubeProxyVersion) {
			return false
		}
	}
	return true
}
602791
func NeedsHealthCheck(service *api.Service) bool {
	if service.Spec.Type != api.ServiceTypeLoadBalancer {
		return false
	}
	return RequestsOnlyLocalTraffic(service)
}
920920
func (s *SQLKeyDBStore) HealthCheck() error {
	dbPrivateKey := GormPrivateKey{}
	tableOk := s.db.HasTable(&dbPrivateKey)
	switch {
	case s.db.Error != nil:
		return s.db.Error
	case !tableOk:
		return fmt.Errorf(
			"Cannot access table: %s", dbPrivateKey.TableName())
	}
	return nil
}
1244375
func (s *SingleInstanceHealth) SetHealthStatus(v string) *SingleInstanceHealth {
	s.HealthStatus = &v
	return s
}
510224
func (v *Vserver) AddHealthcheck(h *Healthcheck) error {
	key := h.Key()
	if _, ok := v.Healthchecks[key]; ok {
		return fmt.Errorf("Vserver %q already contains Healthcheck %q", v.Name, key)
	}
	v.Healthchecks[key] = h
	return nil
}
1082676
func (provider *VersionedDBProvider) HealthCheck(ctx context.Context) error {
	return provider.couchInstance.HealthCheck(ctx)
}
1226332
func (b *BlockChain) IsDeploymentActive(deploymentID uint32) (bool, error) {
	b.chainLock.Lock()
	state, err := b.deploymentState(b.bestChain.Tip(), deploymentID)
	b.chainLock.Unlock()
	if err != nil {
		return false, err
	}

	return state == ThresholdActive, nil
}
537881
func (s *GetHealthCheckInput) SetHealthCheckId(v string) *GetHealthCheckInput {
	s.HealthCheckId = &v
	return s
}
109397
func (s *CatIndicesService) Health(healthState string) *CatIndicesService {
	s.health = healthState
	return s
}