Documentation
¶
Overview ¶
Package toolchain provides an abstraction layer for developer tooling that can be installed in the container image at build time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clear ¶
func Clear()
Clear removes all toolchains from the registry. This function is primarily intended for testing.
func DetectToolchains ¶
DetectToolchains examines the workspace directory for files that indicate which toolchains are needed. Returns a deduplicated, sorted list of toolchain names.
Only returns names of toolchains that are registered in the registry. Returns nil for nonexistent directories.
func Exists ¶
Exists returns true if a toolchain with the given name exists in the registry. This function is safe for concurrent use.
Types ¶
type Toolchain ¶
type Toolchain interface {
// Name returns the unique identifier (e.g., "node", "go").
Name() string
// DisplayName returns the human-readable name (e.g., "Node.js", "Go").
DisplayName() string
// Packages returns Alpine packages to install via apk add.
Packages() []string
// InstallCommands returns shell commands to run after apk install.
// Each string becomes a separate RUN instruction. Return nil if
// apk packages are sufficient.
InstallCommands() []string
// EnvVars returns environment variables to bake into the image
// (e.g., "GOPATH=/home/dev/go"). Return nil if none needed.
EnvVars() []string
// PathEntries returns directories to prepend to PATH.
// Return nil if none needed.
PathEntries() []string
}
Toolchain defines the interface for installable developer tooling.