platformutil

package
v2.4.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ErofsOSFeature = "erofs"

Variables

This section is empty.

Functions

func AppendOSFeatureVariants

func AppendOSFeatureVariants(platformz []ocispec.Platform, features ...string) []ocispec.Platform

func CanExecProbably

func CanExecProbably(ss ...string) (bool, error)

func IgnoreOSFeaturesMatcher

func IgnoreOSFeaturesMatcher(mc platforms.MatchComparer, features ...string) platforms.MatchComparer

IgnoreOSFeaturesMatcher wraps a MatchComparer and ignores selected os.features on candidate platforms before delegating to the wrapped matcher.

func LayerDescs

func LayerDescs(ctx context.Context, provider content.Provider, imageTarget ocispec.Descriptor, platform platforms.MatchComparer) ([]ocispec.Descriptor, error)

func NewMatchComparer

func NewMatchComparer(all bool, ss []string) (platforms.MatchComparer, error)

NewMatchComparer returns MatchComparer. If all is true, NewMatchComparer always returns All, regardless to the value of ss. If all is false and ss is empty, NewMatchComparer returns DefaultStrict (not Default). Otherwise NewMatchComparer returns Ordered MatchComparer.

func NewMatchComparerFromOCISpecPlatformSlice

func NewMatchComparerFromOCISpecPlatformSlice(platformz []ocispec.Platform) platforms.MatchComparer

NewMatchComparerFromOCISpecPlatformSlice returns MatchComparer. If platformz is empty, NewMatchComparerFromOCISpecPlatformSlice returns All (not DefaultStrict).

func NewOCISpecPlatformSlice

func NewOCISpecPlatformSlice(all bool, ss []string) ([]ocispec.Platform, error)

NewOCISpecPlatformSlice returns a slice of ocispec.Platform If all is true, NewOCISpecPlatformSlice always returns an empty slice, regardless to the value of ss. If all is false and ss is empty, NewOCISpecPlatformSlice returns DefaultSpec. Otherwise NewOCISpecPlatformSlice returns the slice that correspond to ss.

func NormalizeString

func NormalizeString(s string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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