platform

package
v1.39.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	All  = Matcher{All: true}
	Host = Matcher{Platforms: []specs.Platform{platforms.DefaultSpec()}}
)

Functions

func Format

func Format(pl specs.Platform) string

func UnknownPlatformCLIFlag

func UnknownPlatformCLIFlag(platform string, err error) error

UnknownPlatformCLIFlag specifies that the platform provided via CLI flag couldn't be parsed

Types

type Matcher

type Matcher struct {
	All       bool
	Platforms []specs.Platform
}

Matcher describes a collection of target image build platforms

func GetClusterPlatforms

func GetClusterPlatforms(ctx context.Context, kContext string, isDevOrDebug bool) (Matcher, error)

GetClusterPlatforms returns the platforms for the active kubernetes cluster. For `dev` or `debug` if there are multiple cluster node platforms, then it returns only one selection, preferably matching the host platform.

func Parse

func Parse(ps []string) (Matcher, error)

func (Matcher) Array added in v1.37.4

func (m Matcher) Array() []string

func (Matcher) Intersect

func (m Matcher) Intersect(other Matcher) Matcher

Intersect returns the intersection set of Matchers.

func (Matcher) IsCrossPlatform added in v1.37.0

func (m Matcher) IsCrossPlatform() bool

func (Matcher) IsEmpty

func (m Matcher) IsEmpty() bool

func (Matcher) IsMultiPlatform

func (m Matcher) IsMultiPlatform() bool

func (Matcher) IsNotEmpty

func (m Matcher) IsNotEmpty() bool

func (Matcher) String

func (m Matcher) String() string

type Resolver

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

func NewResolver

func NewResolver(ctx context.Context, pipelines []latest.Pipeline, cliPlatformsSelection []string, runMode config.RunMode, kubeContext string) (Resolver, error)

func (Resolver) GetPlatforms

func (r Resolver) GetPlatforms(imageName string) Matcher

Jump to

Keyboard shortcuts

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