// GetStatefulSetListFromChannels returns a list of all Stateful Sets in the cluster reading
// required resource list once from the channels.
GetStatefulSetListFromChannels returns a list of all Stateful Sets in the cluster reading
required resource list once from the channels.
// GetStatefulSetListFromChannels returns a list of all Stateful Sets in the cluster reading // required resource list once from the channels .
func GetStatefulSetListFromChannels(channels *common.ResourceChannels,
	dsQuery *dataselect.DataSelectQuery, heapsterClient *heapster.HeapsterClient) (*StatefulSetList, error) {
	statefulSets := <-channels.StatefulSetList.List
	if err := <-channels.StatefulSetList.Error; err != nil {
		statusErr, ok := err.(*k8serrors.StatusError)
		if ok && statusErr.ErrStatus.Reason == "NotFound" {
			emptyList := &StatefulSetList{
				StatefulSets: make([]StatefulSet, 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
	}
	return CreateStatefulSetList(statefulSets.Items, pods.Items, events.Items, dsQuery, heapsterClient), nil
}
func GetStatefulSetListFromChannels ( channels * common . ResourceChannels , dsQuery * dataselect . DataSelectQuery , heapsterClient * heapster . HeapsterClient ) ( * StatefulSetList , error ) { statefulSets := <- channels . StatefulSetList . List if err := <- channels . StatefulSetList . Error ; err != nil { statusErr , ok := err . ( * k8serrors . StatusError ) if ok && statusErr . ErrStatus . Reason == " " { emptyList := & StatefulSetList { StatefulSets : make ( [ ] StatefulSet , 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 } return CreateStatefulSetList ( statefulSets . Items , pods . Items , events . Items , dsQuery , heapsterClient ) , nil }
GetStatefulSetListFromChannels returns a list of all Stateful Sets in the cluster reading
required resource list once from the channels.
GetStatefulSetListFromChannels returns a list of all Stateful Sets in the cluster reading required resource list once from the channels .
// NotFound - this means that the server does not support Pet Set objects, which // is fine.