func decodeConfigz(resp *http.Response) (*kubeletconfig.KubeletConfiguration, error) {
	// This hack because /configz reports the following structure:
	// {"kubeletconfig": {the JSON representation of kubeletconfigv1beta1.KubeletConfiguration}}
	type configzWrapper struct {
		ComponentConfig kubeletconfigv1beta1.KubeletConfiguration `json:"kubeletconfig"`
	}

	configz := configzWrapper{}
	kubeCfg := kubeletconfig.KubeletConfiguration{}

	contentsBytes, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}

	err = json.Unmarshal(contentsBytes, &configz)
	if err != nil {
		return nil, err
	}

	scheme, _, err := kubeletconfigscheme.NewSchemeAndCodecs()
	if err != nil {
		return nil, err
	}
	err = scheme.Convert(&configz.ComponentConfig, &kubeCfg, nil)
	if err != nil {
		return nil, err
	}

	return &kubeCfg, nil
}
// Decodes the http response from /configz and returns a kubeletconfig.KubeletConfiguration (internal type).
Decodes the http response from /configz and returns a kubeletconfig.KubeletConfiguration (internal type).
// Decodes the http response from / configz and returns a kubeletconfig . KubeletConfiguration ( internal type ) .
func decodeConfigz(resp *http.Response) (*kubeletconfig.KubeletConfiguration, error) {
	type configzWrapper struct {
		ComponentConfig kubeletconfigv1beta1.KubeletConfiguration `json:"kubeletconfig"`
	}
	configz := configzWrapper{}
	kubeCfg := kubeletconfig.KubeletConfiguration{}
	contentsBytes, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}
	err = json.Unmarshal(contentsBytes, &configz)
	if err != nil {
		return nil, err
	}
	scheme, _, err := kubeletconfigscheme.NewSchemeAndCodecs()
	if err != nil {
		return nil, err
	}
	err = scheme.Convert(&configz.ComponentConfig, &kubeCfg, nil)
	if err != nil {
		return nil, err
	}
	return &kubeCfg, nil
}
func decodeConfigz ( resp * http . Response ) ( * kubeletconfig . KubeletConfiguration , error ) { type configzWrapper struct { ComponentConfig kubeletconfigv1beta1 . KubeletConfiguration `json:"kubeletconfig"` } configz := configzWrapper { } kubeCfg := kubeletconfig . KubeletConfiguration { } contentsBytes , err := ioutil . ReadAll ( resp . Body ) if err != nil { return nil , err } err = json . Unmarshal ( contentsBytes , & configz ) if err != nil { return nil , err } scheme , _ , err := kubeletconfigscheme . NewSchemeAndCodecs ( ) if err != nil { return nil , err } err = scheme . Convert ( & configz . ComponentConfig , & kubeCfg , nil ) if err != nil { return nil , err } return & kubeCfg , nil }
Decodes the http response from /configz and returns a kubeletconfig.KubeletConfiguration (internal type).
Decodes the http response from / configz and returns a kubeletconfig . KubeletConfiguration ( internal type ) .
// This hack because /configz reports the following structure: // {"kubeletconfig": {the JSON representation of kubeletconfigv1beta1.KubeletConfiguration}}