detect

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	DetectedFromUser    string = "user-supplied"
	DetectedFromCluster string = "autodetected from cluster"
	DetectedFailure     string = "autodetection failed"
)

Variables

This section is empty.

Functions

func KubernetesVersion added in v0.7.0

func KubernetesVersion() (platform.Version, error)

func OpenshiftVersion added in v0.7.0

func OpenshiftVersion() (platform.Version, error)

func Platform added in v0.7.0

func Platform() (platform.Platform, error)

func Version added in v0.7.0

func Version(plat platform.Platform) (platform.Version, error)

Types

type ClusterInfo added in v0.7.0

type ClusterInfo struct {
	Platform PlatformInfo `json:"platform"`
	Version  VersionInfo  `json:"version"`
}

func (ClusterInfo) String added in v0.10.0

func (ci ClusterInfo) String() string

func (ClusterInfo) ToJSON added in v0.10.0

func (ci ClusterInfo) ToJSON() string

type PlatformInfo added in v0.7.0

type PlatformInfo struct {
	AutoDetected platform.Platform `json:"autoDetected"`
	UserSupplied platform.Platform `json:"userSupplied"`
	Discovered   platform.Platform `json:"discovered"`
}

func FindPlatform added in v0.7.0

func FindPlatform(userSupplied platform.Platform) (PlatformInfo, string, error)

type VersionInfo added in v0.7.0

type VersionInfo struct {
	AutoDetected platform.Version `json:"autoDetected"`
	UserSupplied platform.Version `json:"userSupplied"`
	Discovered   platform.Version `json:"discovered"`
}

func FindVersion added in v0.7.0

func FindVersion(plat platform.Platform, userSupplied platform.Version) (VersionInfo, string, error)

Jump to

Keyboard shortcuts

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