platform

package
v2.13.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 15

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) (Matcher, error)

GetClusterPlatforms returns the platforms for the active kubernetes cluster.

func Parse

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

func (Matcher) Array

func (m Matcher) Array() []string

func (Matcher) Contains

func (m Matcher) Contains(other specs.Platform) bool

Contains returns if the Matcher contains the other platform

func (Matcher) Intersect

func (m Matcher) Intersect(other Matcher) Matcher

Intersect returns the intersection set of Matchers.

func (Matcher) IsCrossPlatform

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, opts ResolverOpts) (Resolver, error)

func (Resolver) GetPlatforms

func (r Resolver) GetPlatforms(imageName string) Matcher

type ResolverOpts

type ResolverOpts struct {
	KubeContext               string
	CliPlatformsSelection     []string
	DisableMultiPlatformBuild bool
	CheckClusterNodePlatforms bool
}

Jump to

Keyboard shortcuts

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