// GetDeploymentList returns a list of all Deployments in the cluster
// reading required resource list once from the channels.
GetDeploymentList returns a list of all Deployments in the cluster
reading required resource list once from the channels.
// GetDeploymentList returns a list of all Deployments in the cluster // reading required resource list once from the channels .
func GetDeploymentListFromChannels(channels *common.ResourceChannels,
	dsQuery *dataselect.DataSelectQuery, heapsterClient *heapster.HeapsterClient) (*DeploymentList, error) {
	deployments := <-channels.DeploymentList.List
	if err := <-channels.DeploymentList.Error; err != nil {
		statusErr, ok := err.(*k8serrors.StatusError)
		if ok && statusErr.ErrStatus.Reason == "NotFound" {
			emptyList := &DeploymentList{
				Deployments: make([]Deployment, 0),
			}
			return emptyList, nil
		}
		return nil, err
	}
	pods := <-channels.PodList.List
	if err := <-channels.PodList.Error; err != nil {
		return nil, err
	}
	events := <-channels.EventList.List
	if err := <-channels.EventList.Error; err != nil {
		return nil, err
	}
	rs := <-channels.ReplicaSetList.List
	if err := <-channels.ReplicaSetList.Error; err != nil {
		return nil, err
	}
	return CreateDeploymentList(deployments.Items, pods.Items, events.Items, rs.Items, dsQuery, heapsterClient), nil
}
func GetDeploymentListFromChannels ( channels * common . ResourceChannels , dsQuery * dataselect . DataSelectQuery , heapsterClient * heapster . HeapsterClient ) ( * DeploymentList , error ) { deployments := <- channels . DeploymentList . List if err := <- channels . DeploymentList . Error ; err != nil { statusErr , ok := err . ( * k8serrors . StatusError ) if ok && statusErr . ErrStatus . Reason == " " { emptyList := & DeploymentList { Deployments : make ( [ ] Deployment , 0 ) , } return emptyList , nil } return nil , err } pods := <- channels . PodList . List if err := <- channels . PodList . Error ; err != nil { return nil , err } events := <- channels . EventList . List if err := <- channels . EventList . Error ; err != nil { return nil , err } rs := <- channels . ReplicaSetList . List if err := <- channels . ReplicaSetList . Error ; err != nil { return nil , err } return CreateDeploymentList ( deployments . Items , pods . Items , events . Items , rs . Items , dsQuery , heapsterClient ) , nil }
GetDeploymentList returns a list of all Deployments in the cluster
reading required resource list once from the channels.
GetDeploymentList returns a list of all Deployments in the cluster reading required resource list once from the channels .
// NotFound - this means that the server does not support Deployment objects, which // is fine.