environment

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package environment contains default environment contents.

Index

Constants

This section is empty.

Variables

View Source
var (
	LinuxAmd64 = Platform{
		ID:           "linux/amd64",
		Arch:         "x86_64",
		Target:       "x86_64-talos-linux-musl",
		Build:        "x86_64-linux-musl",
		Host:         "x86_64-linux-musl",
		LLBPlatform:  llb.LinuxAmd64,
		PlatformSpec: platforms.MustParse("linux/amd64"),
	}

	LinuxArm64 = Platform{
		ID:           "linux/arm64",
		Arch:         "aarch64",
		Target:       "aarch64-talos-linux-musl",
		Build:        "aarch64-linux-musl",
		Host:         "aarch64-linux-musl",
		LLBPlatform:  llb.LinuxArm64,
		PlatformSpec: platforms.MustParse("linux/arm64"),
	}

	LinuxArmv7 = Platform{
		ID:           "linux/armv7",
		Arch:         "armv7",
		Target:       "armv7-talos-linux-musl",
		Build:        "armv7-linux-musl",
		Host:         "armv7-linux-musl",
		LLBPlatform:  llb.LinuxArmhf,
		PlatformSpec: platforms.MustParse("linux/arm7"),
	}
)

Platform definitions.

View Source
var Platforms = map[string]Platform{}

Platforms is mapping of platform ID to Platform.

Functions

func Default

func Default() types.Variables

Default returns default values for environment variables.

Types

type Options

type Options struct {
	BuildPlatform    Platform
	TargetPlatform   Platform
	Target           string
	CommonPrefix     string
	ProxyEnv         *llb.ProxyEnv
	SourceDateEpoch  time.Time
	CacheIDNamespace string
	NoCache          bool
}

Options for bldr.

func (*Options) GetVariables

func (options *Options) GetVariables() types.Variables

GetVariables returns set of variables set for options.

type Platform

type Platform struct {
	ID           string
	Arch         string
	Target       string
	Build        string
	Host         string
	LLBPlatform  llb.ConstraintsOpt
	PlatformSpec specs.Platform
}

Platform describes build & target platforms.

func (Platform) BuildVariables

func (p Platform) BuildVariables() types.Variables

BuildVariables returns build env variables.

func (*Platform) Set

func (p *Platform) Set(id string) error

Set implements pflag.Value interface.

func (Platform) String

func (p Platform) String() string

func (Platform) TargetVariables

func (p Platform) TargetVariables() types.Variables

TargetVariables returns target env variables.

func (*Platform) Type

func (p *Platform) Type() string

Type implements pflag.Value interface.

Jump to

Keyboard shortcuts

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