// GenResources parses a given kubernetes object and returns a ResourceList or an error if the object is not
// a Service, Endpoints or Ingress. Returned ResourceList can be empty.
GenResources parses a given kubernetes object and returns a ResourceList or an error if the object is not
a Service, Endpoints or Ingress. Returned ResourceList can be empty.
// GenResources parses a given kubernetes object and returns a ResourceList or an error if the object is not // a Service Endpoints or Ingress . Returned ResourceList can be empty .
func GenResources(store *Cache, client SuperClient, obj interface{}) (ResourceList, error) {
	var (
		list ResourceList = make([]*Resource, 0, 1)
		po interface{}
	)
	switch t := obj.(type) {
	default:
		return list, errors.New("Unsupported type")
	case *extensions.Ingress:
		list = resourcesFromIngress(store, client, t)
		po = Ingress(*t)
	case *api.Service:
		list = resourcesFromService(store, client, t)
		po = Service(*t)
	case *api.Endpoints:
		list = resourcesFromEndpoints(store, client, t)
		po = Endpoints(*t)
	}
	Sort(list, ByID)
	logger.Debugf("Resources from %v: %v", po, list)
	return list, nil
}
func GenResources ( store * Cache , client SuperClient , obj interface { } ) ( ResourceList , error ) { var ( list ResourceList = make ( [ ] * Resource , 0 , 1 ) po interface { } ) switch t := obj . ( type ) { default : return list , errors . New ( " " ) case * extensions . Ingress : list = resourcesFromIngress ( store , client , t ) po = Ingress ( * t ) case * api . Service : list = resourcesFromService ( store , client , t ) po = Service ( * t ) case * api . Endpoints : list = resourcesFromEndpoints ( store , client , t ) po = Endpoints ( * t ) } Sort ( list , ByID ) logger . Debugf ( " " , po , list ) return list , nil }
GenResources parses a given kubernetes object and returns a ResourceList or an error if the object is not
a Service, Endpoints or Ingress.
GenResources parses a given kubernetes object and returns a ResourceList or an error if the object is not a Service Endpoints or Ingress .