Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDevVersion ¶ added in v0.7.8
IsDevVersion reports whether the given ldflags-injected version string represents a non-release build. Used to pick :base-dev over :base-latest by default so `go install @main` gets a matching in-VM gocker binary.
Types ¶
type Config ¶
type Config struct {
Isolation string `yaml:"isolation"` // full, hybrid, shared
Compose Subsystem `yaml:"compose,omitempty"`
Sandbox SandboxConfig `yaml:"sandbox,omitempty"`
Runtime string `yaml:"runtime,omitempty"` // "container" or "nerdctl"
Binary string `yaml:"runtimeBinary,omitempty"` // custom path to runtime binary
// LegacyWorkspaceDirs accepts top-level `workspaceDirs:` for back-compat.
// Old configs (and hand-edited ones) placed it here instead of under
// sharedVM; Load() migrates it into SharedVM.WorkspaceDirs.
LegacyWorkspaceDirs []string `yaml:"workspaceDirs,omitempty"`
}
Config represents ~/.gocker/config.yaml.
func Load ¶
func Load() *Config
Load reads ~/.gocker/config.yaml. Returns defaults if the file doesn't exist.
func (*Config) IsolationFor ¶
IsolationFor returns the effective isolation mode for a subsystem. Priority: CLI flag > subsystem config > global config > "full".
func (*Config) RuntimeBinary ¶
RuntimeBinary returns the path to the container runtime binary.
func (*Config) SyncClaudeSession ¶
SyncClaudeSession returns whether Claude Code sessions should be synced between host and sandbox.
type SandboxConfig ¶
type SandboxConfig struct {
Isolation string `yaml:"isolation,omitempty"`
SyncClaudeSession *bool `yaml:"syncClaudeSession,omitempty"` // sync Claude Code sessions between host and sandbox (default: true)
}
SandboxConfig extends Subsystem with sandbox-specific settings.
type SharedVM ¶
type SharedVM struct {
}
SharedVM configures the persistent shared VM for hybrid/shared modes.
func (*SharedVM) EffectiveWorkspaceDirs ¶
EffectiveWorkspaceDirs returns WorkspaceDirs or defaults to user home.