type VersionGetter … type KubeVersionGetter … // NewKubeVersionGetter returns a new instance of KubeVersionGetter func NewKubeVersionGetter(client clientset.Interface) VersionGetter { … } // ClusterVersion gets API server version func (g *KubeVersionGetter) ClusterVersion() (string, *versionutil.Version, error) { … } // KubeadmVersion gets kubeadm version func (g *KubeVersionGetter) KubeadmVersion() (string, *versionutil.Version, error) { … } // VersionFromCILabel resolves a version label like "latest" or "stable" to an actual version using the public Kubernetes CI uploads func (g *KubeVersionGetter) VersionFromCILabel(ciVersionLabel, description string) (string, *versionutil.Version, error) { … } // KubeletVersions gets the versions of the kubelets in the cluster. func (g *KubeVersionGetter) KubeletVersions() (map[string][]string, error) { … } // ComponentVersions gets the versions of the control-plane components in the cluster. // The name parameter is the name of the component to get the versions for. // The function returns a map with the version as the key and a list of node names as the value. func (g *KubeVersionGetter) ComponentVersions(name string) (map[string][]string, error) { … } type OfflineVersionGetter … // NewOfflineVersionGetter wraps a VersionGetter and skips online communication if default information is supplied. // Version can be "" and the behavior will be identical to the versionGetter passed in. func NewOfflineVersionGetter(versionGetter VersionGetter, version string) VersionGetter { … } // VersionFromCILabel will return the version that was passed into the struct func (o *OfflineVersionGetter) VersionFromCILabel(ciVersionLabel, description string) (string, *versionutil.Version, error) { … }