kubeversion

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package kubeversion provides the ability to retrieve all supported Kubernetes versions through the MKS V1 API.

Example of getting all supported Kubernetes versions

kubeVersions, _, err := kubeversion.List(ctx, mksClient)
if err != nil {
  log.Fatal(err)
}
for _, version := range kubeVersions {
  fmt.Printf("%+v\n", version)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type View

type View struct {
	// Version represents the supported Kubernetes version in format: "X.Y.Z".
	Version string `json:"version"`

	// IsDefault flag indicates if kubernetes version is default.
	IsDefault bool `json:"is_default"`
}

View represents an unmarshalled Kubernetes version body from an API response.

func List

func List(ctx context.Context, client *v1.ServiceClient) ([]*View, *v1.ResponseResult, error)

List gets a list of all supported Kubernetes versions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL