// LoadComponents returns components from a given control plane address
LoadComponents returns components from a given control plane address
// LoadComponents returns components from a given control plane address
func (k *KubernetesComponents) LoadComponents() ([]components_v1alpha1.Component, error) {
	b := backoff.NewExponentialBackOff()
	b.MaxElapsedTime = maxRetryTime
	url := fmt.Sprintf("%s/components", k.config.ControlPlaneAddress)
	var components []components_v1alpha1.Component
	err := backoff.Retry(func() error {
		body, err := requestControlPlane(url)
		if err != nil {
			return err
		}
		err = json.Unmarshal(body, &components)
		if err != nil {
			return nil
		}
		return nil
	}, b)
	return components, err
}
func ( k * KubernetesComponents ) LoadComponents ( ) ( [ ] components_v1alpha1 . Component , error ) { b := backoff . NewExponentialBackOff ( ) b . MaxElapsedTime = maxRetryTime url := fmt . Sprintf ( " " , k . config . ControlPlaneAddress ) var components [ ] components_v1alpha1 . Component err := backoff . Retry ( func ( ) error { body , err := requestControlPlane ( url ) if err != nil { return err } err = json . Unmarshal ( body , & components ) if err != nil { return nil } return nil } , b ) return components , err }
LoadComponents returns components from a given control plane address
LoadComponents returns components from a given control plane address