Help us shape the future of Go! Take the 2026 Go Developer Survey

envspec

package
v0.7.218 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const StepTest = "test"

StepTest is the detected test command. It is not a provisioning step: it exists only as the input to the Dockerfile CMD that `chunk sidecar build` generates from a piped env spec, and is never run as part of the sidecar setup sequence. How a project's tests are actually invoked is user-owned config — see config.ProjectConfig.Commands.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Stack        string `json:"stack"`
	Setup        []Step `json:"setup"`
	Image        string `json:"image"`
	ImageVersion string `json:"image_version"`
}

Environment describes the detected tech stack and build configuration for a repository.

func (*Environment) BinaryPaths

func (e *Environment) BinaryPaths() string

BinaryPaths returns colon-separated PATH prefixes needed for the detected stack. cimg images set these via Docker ENV which e2b does not propagate to SSH sessions.

func (*Environment) ForConfig added in v0.7.139

func (e *Environment) ForConfig() *Environment

ForConfig returns a copy of e suitable for persisting to .chunk/config.json, with the StepTest step removed so that Setup contains only steps that are really run during setup.

Callers that generate a Dockerfile must use the full env spec, not this copy: dropping StepTest drops the image's CMD.

func (*Environment) ProvisioningSteps added in v0.7.139

func (e *Environment) ProvisioningSteps() int

ProvisioningSteps returns the number of steps that really run during setup, i.e. Setup without StepTest. Zero for a nil receiver.

func (*Environment) SetupStep

func (e *Environment) SetupStep(name string) string

SetupStep returns the command for the named setup step, or "" if absent.

type Step

type Step struct {
	Name    string `json:"name"`
	Command string `json:"command"`
}

Step is a single named provisioning command in the sidecar setup sequence.

Jump to

Keyboard shortcuts

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