config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureBuildDir added in v0.4.0

func EnsureBuildDir(buildDir string) error

EnsureBuildDir creates the build context directory if it doesn't exist.

func ResolveBuildDir added in v0.4.0

func ResolveBuildDir(cwd, configDir string, projectConfigExists bool) string

ResolveBuildDir returns the build context directory. When projectConfigExists is true, returns cwd/.devcell (project-local). Otherwise falls back to configDir (global).

Types

type Config

type Config struct {
	CellID        string
	AppName       string
	SessionName   string
	CellHome      string
	ConfigDir     string
	BuildDir      string // build context dir: .devcell/ when project config exists, else ConfigDir
	ImageTag      string
	Image         string
	ContainerName string
	Hostname      string
	PortPrefix    string
	VNCPort       string
	RDPPort       string
	BaseDir       string
	HostUser      string
	HostHome      string
	LocalMode     bool // DEVCELL_LOCAL_MODE=true — always rebuild image on run
}

Config holds all runtime variables resolved from environment and cwd.

func Load

func Load(cwd string, getenv func(string) string) Config

Load resolves all config fields from cwd and an environment lookup function. Pure — no os.* calls inside.

func LoadFromOS

func LoadFromOS() (Config, error)

LoadFromOS resolves config using the real OS environment and working directory.

func (*Config) ResolveAvailablePorts added in v0.3.0

func (c *Config) ResolveAvailablePorts()

ResolveAvailablePorts checks whether VNCPort and RDPPort are free and replaces them with nearby available ports when they are already bound.

Jump to

Keyboard shortcuts

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