common

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LINUX = "linux"
)

Variables

This section is empty.

Functions

func DisplayProgress

func DisplayProgress(ctx context.Context, eg *errgroup.Group, buildChannel chan *client.SolveStatus, progress progressui.DisplayMode)

DisplayProgress starts a goroutine to display build progress. This encapsulates the common pattern used in both generate and patch commands.

func GetDefaultLinuxPlatform

func GetDefaultLinuxPlatform() ispec.Platform

GetDefaultLinuxPlatform returns a normalized Linux platform, defaulting to Linux if not already Linux.

func ResolvePatchedTag

func ResolvePatchedTag(imageRef reference.Named, explicitTag, suffix string) (string, error)

ResolvePatchedTag merges explicit tag & suffix rules, returning the final patched tag.

func SetupBuildkitConfigAndManager

func SetupBuildkitConfigAndManager(
	ctx context.Context,
	c gwclient.Client,
	image string,
	platform *ispec.Platform,
	workingFolder string,
	osInfo *OSInfo,
) (*buildkit.Config, pkgmgr.PackageManager, error)

SetupBuildkitConfigAndManager initializes buildkit config and package manager. This combines the common pattern used in both generate and patch commands.

Types

type OSInfo

type OSInfo struct {
	Type    string
	Version string
}

OSInfo contains the OS type and version information.

func GetOSInfo

func GetOSInfo(ctx context.Context, osreleaseBytes []byte) (*OSInfo, error)

GetOSInfo extracts OS type and version from os-release data.

Jump to

Keyboard shortcuts

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