// isReady returns true if the manager has retrieved baggage restrictions from the remote source.
764650
func (m *RestrictionManager) isReady() bool {
	m.mux.RLock()
	defer m.mux.RUnlock()
	return m.initialized
}
207769
func HasReason(ctx context.Context) bool {
	_, ok := ctx.Value(ctxKeyReason).(string)
	return ok
}
1070005
func (q *Quest_Desc_Meta_Retry) IsEmpty() bool {
	return q.Crashed == 0 && q.Expired == 0 && q.Failed == 0 && q.TimedOut == 0
}
59740
func (e *Erratic) Ready() bool {
	q := atomic.LoadUint64(&e.q)
	if q >= 3 && q < 5 {
		return true
	}
	return false
}
469912
func checkIfReadyForAdditionalControlPlane(initConfiguration *kubeadmapi.ClusterConfiguration, hasCertificateKey bool) error {
	// blocks if the cluster was created without a stable control plane endpoint
	if initConfiguration.ControlPlaneEndpoint == "" {
		return errors.New("unable to add a new control plane instance a cluster that doesn't have a stable controlPlaneEndpoint address")
	}

	if !hasCertificateKey {
		// checks if the certificates that must be equal across controlplane instances are provided
		if ret, err := certs.SharedCertificateExists(initConfiguration); !ret {
			return err
		}
	}

	return nil
}
751437
func (cs *clientStore) isValid(ID string, connID []byte) bool {
	cs.RLock()
	valid := cs.lookupByConnIDOrID(ID, connID) != nil
	cs.RUnlock()
	return valid
}
829077
func (a *vppClient) WaitReady() error {
	// join the path to the shared memory segment
	var path string
	if a.shmPrefix == "" {
		path = filepath.Join(shmDir, vppShmFile)
	} else {
		path = filepath.Join(shmDir, a.shmPrefix+"-"+vppShmFile)
	}

	// check if file at the path already exists
	if _, err := os.Stat(path); err == nil {
		// file exists, we are ready
		return nil
	} else if !os.IsNotExist(err) {
		return err
	}

	// file does not exist, start watching folder
	watcher, err := fsnotify.NewWatcher()
	if err != nil {
		return err
	}
	defer watcher.Close()

	// start watching directory
	if err := watcher.Add(shmDir); err != nil {
		return err
	}

	for {
		select {
		case <-time.After(MaxWaitReady):
			return fmt.Errorf("waiting for shared memory segment timed out (%s)", MaxWaitReady)
		case e := <-watcher.Errors:
			return e
		case ev := <-watcher.Events:
			if ev.Name == path {
				if (ev.Op & fsnotify.Create) == fsnotify.Create {
					// file was created, we are ready
					return nil
				}
			}
		}
	}
}
196331
func (v *ValidationDefinition) HasRequiredOnly() bool {
	if len(v.Values) > 0 {
		return false
	}
	if v.Format != "" || v.Pattern != "" {
		return false
	}
	if (v.Minimum != nil) || (v.Maximum != nil) || (v.MaxLength != nil) {
		return false
	}
	return true
}
281021
func isDeploymentReady(obj runtime.Object) statuschecker.ObjectStatusResult {
	var deployment apps_v1.Deployment
	if err := util.ConvertType(appsV1Scheme, obj, &deployment); err != nil {
		return statuschecker.ObjectStatusError{
			Error: err,
		}
	}

	replicas := deployment.Spec.Replicas

	generation := deployment.Generation
	observedGeneration := deployment.Status.ObservedGeneration
	updatedReplicas := deployment.Status.UpdatedReplicas
	availableReplicas := deployment.Status.AvailableReplicas

	if generation <= observedGeneration {
		progressingCond := getDeploymentCondition(&deployment, apps_v1.DeploymentProgressing)
		if progressingCond != nil && progressingCond.Reason == timedOutReason {
			return statuschecker.ObjectStatusError{
				ExternalError:  true,
				RetriableError: false,
				Error:          errors.Errorf("deployment exceeded its progress deadline"),
			}
		}
		if replicas != nil && updatedReplicas < *replicas {
			return statuschecker.ObjectStatusInProgress{
				Message: fmt.Sprintf("Number of replicas converging. Requested=%d, Updated=%d", *replicas, updatedReplicas),
			}
		}

		if deployment.Status.Replicas > updatedReplicas {
			return statuschecker.ObjectStatusInProgress{
				Message: fmt.Sprintf("Number of replicas converging. Replicas=%d, Updated=%d", deployment.Status.Replicas, updatedReplicas),
			}
		}

		if availableReplicas < updatedReplicas {
			return statuschecker.ObjectStatusInProgress{
				Message: fmt.Sprintf("Number of replicas converging. Available=%d, Updated=%d", availableReplicas, updatedReplicas),
			}
		}

		return statuschecker.ObjectStatusReady{}
	}

	return statuschecker.ObjectStatusInProgress{
		Message: "Deployment in progress",
	}
}
379191
func (p *Pod) WaitReady(ctx context.Context) error {
	f := func() bool {
		if err := p.refreshState(); err != nil {
			return false
		}

		return p.IsSupervisorReady()
	}

	return retry(ctx, f, 100*time.Millisecond)
}
181089
func isReadOnly(methodName string) bool {
	return strings.HasPrefix(methodName, "Get") || strings.HasPrefix(methodName, "List")
}
837554
func getReady(name string, wg *sync.WaitGroup) {
	defer wg.Done()
	fmt.Printf("%s started getting ready\n", name)
	// the time it takes to get ready is at least 60 seconds, plus a random number up to 90 seconds
	sec := rand.Intn(30) + 60
	// this is where they get ready
	time.Sleep(time.Duration(sec) * time.Second)
	fmt.Printf("%s spent %d seconds getting ready\n", name, sec)
}
381469
func (sd *SignedData) IsDetached() bool {
	return sd.psd.EncapContentInfo.EContent.Bytes == nil
}
304429
func (p *PrintingKubeClient) WatchUntilReady(ns string, r io.Reader, timeout int64, shouldWait bool) error {
	_, err := io.Copy(p.Out, r)
	return err
}
969448
func (this *Beanstalkd) PeekReady() (*Job, error) {
	fmt.Fprintf(this.conn, "peek-ready\r\n")
	return this.handlePeekReply()
}
527716
func (a *attributes) IsReadOnly() bool {
	return a.event.Verb == "get" || a.event.Verb == "list" || a.event.Verb == "watch"
}
1043588
func (p *ConnPool) deadlinePassed(deadline *time.Time) bool {
	return deadline != nil && time.Now().After(*deadline)
}