Documentation ¶
Index ¶
- Variables
- func Any(platform ...specs.Platform) platforms.MatchComparerdeprecated
- func Default() platforms.MatchComparerdeprecated
- func DefaultSpec() specs.Platformdeprecated
- func DefaultString() stringdeprecated
- func Format(platform specs.Platform) stringdeprecated
- func GetWindowsOsVersion() stringdeprecated
- func MustParse(specifier string) specs.Platformdeprecated
- func NewMatcher(platform specs.Platform) platforms.Matcherdeprecated
- func Normalize(platform specs.Platform) specs.Platformdeprecated
- func Only(platform specs.Platform) platforms.MatchComparerdeprecated
- func OnlyStrict(platform specs.Platform) platforms.MatchComparerdeprecated
- func Ordered(platform ...specs.Platform) platforms.MatchComparerdeprecated
- func Parse(specifier string) (specs.Platform, error)deprecated
- type MatchComparerdeprecated
- func DefaultStrict() MatchComparerdeprecated
- type Matcherdeprecated
- type Platformdeprecated
Constants ¶
This section is empty.
Variables ¶
var All = platforms.All
All is a platform MatchComparer which matches all platforms with preference for ordering.
Deprecated: use platforms.All.
Functions ¶
func Any
deprecated
added in
v1.2.0
func Any(platform ...specs.Platform) platforms.MatchComparer
Any returns a platform MatchComparer which matches any of the platforms with no preference for ordering.
Deprecated: use platforms.Any.
func Default
deprecated
func Default() platforms.MatchComparer
Default returns the default matcher for the platform.
Deprecated: use platforms.Default.
func DefaultSpec
deprecated
DefaultSpec returns the current platform's default platform specification.
Deprecated: use platforms.DefaultSpec.
func DefaultString
deprecated
added in
v1.2.0
func DefaultString() string
DefaultString returns the default string specifier for the platform.
Deprecated: use platforms.DefaultString.
func Format
deprecated
Format returns a string specifier from the provided platform specification.
Deprecated: use platforms.Format.
func GetWindowsOsVersion
deprecated
added in
v1.7.6
func GetWindowsOsVersion() string
GetWindowsOsVersion returns the version of Windows of the local system, it returns an empty string on other platforms.
Deprecated: this function is deprecated, and removed in github.com/containerd/platforms
func MustParse
deprecated
added in
v1.2.0
MustParse is like Parses but panics if the specifier cannot be parsed. Simplifies initialization of global variables.
Deprecated: use platforms.MustParse.
func NewMatcher
deprecated
added in
v1.1.0
NewMatcher returns a simple matcher based on the provided platform specification. The returned matcher only looks for equality based on os, architecture and variant.
One may implement their own matcher if this doesn't provide the required functionality.
Applications should opt to use `Match` over directly parsing specifiers.
Deprecated: use platforms.NewMatcher.
func Normalize
deprecated
Normalize validates and translate the platform to the canonical value.
For example, if "Aarch64" is encountered, we change it to "arm64" or if "x86_64" is encountered, it becomes "amd64".
Deprecated: use platforms.Normalize.
func Only
deprecated
added in
v1.2.0
func Only(platform specs.Platform) platforms.MatchComparer
Only returns a match comparer for a single platform using default resolution logic for the platform.
For arm/v8, will also match arm/v7, arm/v6 and arm/v5 For arm/v7, will also match arm/v6 and arm/v5 For arm/v6, will also match arm/v5 For amd64, will also match 386
Deprecated: use platforms.Only.
func OnlyStrict
deprecated
added in
v1.5.0
func OnlyStrict(platform specs.Platform) platforms.MatchComparer
OnlyStrict returns a match comparer for a single platform.
Unlike Only, OnlyStrict does not match sub platforms. So, "arm/vN" will not match "arm/vM" where M < N, and "amd64" will not also match "386".
OnlyStrict matches non-canonical forms. So, "arm64" matches "arm/64/v8".
Deprecated: use platforms.OnlyStrict.
func Ordered
deprecated
added in
v1.2.0
func Ordered(platform ...specs.Platform) platforms.MatchComparer
Ordered returns a platform MatchComparer which matches any of the platforms but orders them in order they are provided.
Deprecated: use platforms.Ordered.
func Parse
deprecated
Parse parses the platform specifier syntax into a platform declaration.
Platform specifiers are in the format `<os>|<arch>|<os>/<arch>[/<variant>]`. The minimum required information for a platform specifier is the operating system or architecture. If there is only a single string (no slashes), the value will be matched against the known set of operating systems, then fall back to the known set of architectures. The missing component will be inferred based on the local environment.
Deprecated: use platforms.Parse.
Types ¶
type MatchComparer
deprecated
added in
v1.2.0
type MatchComparer = platforms.MatchComparer
MatchComparer is able to match and compare platforms to filter and sort platforms.
Deprecated: use platforms.MatchComparer.
func DefaultStrict
deprecated
added in
v1.5.0
func DefaultStrict() MatchComparer
DefaultStrict returns strict form of Default.
Deprecated: use platforms.DefaultStrict.
type Matcher
deprecated
Matcher matches platforms specifications, provided by an image or runtime.
Deprecated: use platforms.Matcher.
type Platform
deprecated
added in
v1.7.0
Platform is a type alias for convenience, so there is no need to import image-spec package everywhere.
Deprecated: use specs.Platform.