build

package
v0.0.0-...-d98e5ae Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx BuildContext, spec BuildSpec) error

Types

type BaseImageMetadata

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

type BuildContext

type BuildContext struct {
	Context            context.Context
	ExitCleanupWatcher *ExitCleanupWatcher
	Keychain           authn.Keychain

	TempPath string
}

type BuildSpec

type BuildSpec struct {
	BaseRef     string
	InjectLayer BuildSpecInjectLayer
	Target      BuildSpecTarget

	Author      string
	Annotations map[string]string
	Env         map[string]string
}

type BuildSpecInjectLayer

type BuildSpecInjectLayer struct {
	Platform Platform

	SourcePath       string
	DestinationPath  string
	DestinationChown bool
	Entrypoint       string
}

type BuildSpecTarget

type BuildSpecTarget struct {
	Repo string
	Type TargetType
}

type ExitCleanupWatcher

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

func NewExitCleanupWatcher

func NewExitCleanupWatcher() *ExitCleanupWatcher

NewExitCleanupWatcher creates a new ExitCleanupWatcher and starts watching for exit signals. This is useful for situations like layer creation, where a temp file's lifetime is not tied closely to the creation point.

func (*ExitCleanupWatcher) Append

func (w *ExitCleanupWatcher) Append(path string)

func (*ExitCleanupWatcher) Close

func (w *ExitCleanupWatcher) Close()

type Platform

type Platform struct {
	OS   string
	Arch string
}

func ParsePlatform

func ParsePlatform(str string) (Platform, error)

func (Platform) String

func (p Platform) String() string

type TargetType

type TargetType int
const (
	REMOTE TargetType = iota
	LOCAL_DAEMON
	LOCAL_FILE
)

func ParseTargetType

func ParseTargetType(str string) (TargetType, error)

Jump to

Keyboard shortcuts

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