platform

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ARM     = "arm"
	ARM64   = "arm64"
	AMD     = "amd64"
	UNKNOWN = "unknown"
	WINDOWS = "windows"
	DARWIN  = "darwin"
	LINUX   = "linux"
)

Variables

View Source
var (
	ErrUnknown         = errors.New("unknown") // used internally to represent a missed mapping.
	ErrInvalidArgument = errors.New("invalid argument")
	ErrNotFound        = errors.New("not found")
	ErrNotSupport      = errors.New("not support")
	ErrNotImplemented  = errors.New("not implemented") // represents not supported and unimplemented
)

Functions

func DefaultMountClusterImageDir

func DefaultMountClusterImageDir(clusterName string) string

func Format

func Format(platform v1.Platform) string

Format returns a string specifier from the provided platform specification.

func GetCPUVariantByInfo

func GetCPUVariantByInfo(os, arch, variant, model string) string

GetCPUVariantByInfo get 'Cpu architecture', 'model name' from /proc/cpuinfo

func GetDefaultPlatform

func GetDefaultPlatform() v1.Platform

func GetMountClusterImagePlatformDir

func GetMountClusterImagePlatformDir(clusterName string, platform v1.Platform) string

func Matched

func Matched(src, dest v1.Platform) bool

Matched check if src == dest

func Normalize

func Normalize(platform v1.Platform) v1.Platform

func NormalizeArch

func NormalizeArch(arch, variant string) (string, string)

NormalizeArch normalizes the architecture.

func Parse

func Parse(specifier string) (v1.Platform, error)

func ParsePlatforms

func ParsePlatforms(v string) ([]*v1.Platform, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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