environment

package
v0.0.0-...-960f7d7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 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-getdroplet-linux",
		Build:        "x86_64-linux",
		Host:         "x86_64-linux",
		LLBPlatform:  llb.LinuxAmd64,
		PlatformSpec: platforms.MustParse("linux/amd64"),
	}

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

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
}

Options for packer.

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