arch

package
v0.0.0-...-c5633df Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 4 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// DefaultArchitecture represents the default architecture we expect to use
	// if none is present.
	DefaultArchitecture = AMD64
)

Variables

View Source
var AllSupportedArches = []string{
	AMD64,
	ARM64,
	PPC64EL,
	S390X,
	RISCV64,
}

AllSupportedArches records the machine architectures recognised by Juju.

View Source
var HostArch = hostArch

Override for testing.

View Source
var UnsupportedArches = []string{
	"i386", "arm", "armhf", "ppc",
}

UnsupportedArches records the machine architectures not supported by Juju. Note: don't make const to prevent referencing it.

Functions

func IsSupportedArch

func IsSupportedArch(arch string) bool

IsSupportedArch returns true if arch is one supported by Juju.

func NormaliseArch

func NormaliseArch(rawArch string) string

NormaliseArch returns the Juju architecture corresponding to a machine's reported architecture. The Juju architecture is used to filter simple streams lookup of tools and images.

Types

type Arch

type Arch = string

Arch represents a platform architecture.

const (
	AMD64   Arch = "amd64"
	ARM64   Arch = "arm64"
	PPC64EL Arch = "ppc64el"
	S390X   Arch = "s390x"
	RISCV64 Arch = "riscv64"
)

The following constants define the machine architectures supported by Juju.

type Arches

type Arches struct {
	// contains filtered or unexported fields
}

Arches defines a list of arches to compare against.

func AllArches

func AllArches() Arches

AllArches creates a series of arches to compare against.

func (Arches) Contains

func (a Arches) Contains(arch Arch) bool

Contains checks to see if a given arch is found with in the list.

func (Arches) String

func (a Arches) String() string

func (Arches) StringList

func (a Arches) StringList() []string

StringList returns an ordered list of strings. ArchAll will always be the front of the slice to show importance of the enum value.

Jump to

Keyboard shortcuts

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