Documentation
¶
Overview ¶
Package writ houses a validating parser for devcontainer.json files
Package writ houses a validating parser for devcontainer.json files ¶
Package writ houses a validating parser for devcontainer.json files ¶
Package writ houses a validating parser for devcontainer.json files ¶
Package writ houses a validating parser for devcontainer.json files ¶
Package writ houses a validating parser for devcontainer.json files
Index ¶
- Constants
- type AppPort
- type BuildOptions
- type CacheFrom
- type CommandBase
- type DevcontainerConfig
- type DevcontainerFeatureConfig
- type DevcontainerFeatureParser
- type DevcontainerParser
- type DockerComposeFile
- type EnvVarMap
- type FeatureMap
- type FeatureOption
- type FeatureOptionType
- type FeatureOptions
- type FeatureValue
- type FeatureValues
- type ForwardPorts
- type GPUClass
- type GPUEnum
- type GPUUnion
- type HostRequirements
- type LifecycleCommand
- type MobyMount
- type OnAutoForward
- type Parser
- type PortAttributes
- type Protocol
- type Secrets
- type ShutdownAction
- type UserEnvProbe
- type WaitFor
Constants ¶
const DefWorkspacePath string = "/workspace"
DefWorkspacePath is the default path to which the context directory will be mounted inside the container.
This deviates a little bit from the exhibited behavior of Visual Studio Code; under VSCode, this value changes depdending on factors I'm not entirely clear on.
It seems to change depending on whether your code utilizes VSCode's [workspaces](https://code.visualstudio.com/docs/editing/workspaces/workspaces) feature and possibly other things.
As this is not an applicable concept to brig, I've chosen to pin it to a known value instead.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppPort ¶
type AppPort []string
AppPort is a list of ports that are exposed by the container.
This can be a single port or an array of ports. Each port can be a number or a string. A number is mapped to the same port on the host. A string is passed to Docker unchanged and can be used to map ports differently, e.g. "8000:8010".
func (*AppPort) UnmarshalJSON ¶
UnmarshalJSON for the AppPort type
type BuildOptions ¶
type BuildOptions struct {
// The location of the context folder for building the Docker image. The path is relative to
// the folder containing the `devcontainer.json` file.
Context *string `json:"context,omitempty"`
// The location of the Dockerfile that defines the contents of the container. The path is
// relative to the folder containing the `devcontainer.json` file.
Dockerfile *string `json:"dockerfile,omitempty"`
// Build arguments.
Args map[string]string `json:"args,omitempty"`
// The image to consider as a cache. Use an array to specify multiple images.
CacheFrom *CacheFrom `json:"cacheFrom,omitempty"`
// Additional arguments passed to the build command.
Options []string `json:"options,omitempty"`
// Target stage in a multi-stage build.
Target *string `json:"target,omitempty"`
}
BuildOptions represents Docker build-related options.
type CacheFrom ¶
CacheFrom specifies the image to consider as a cache. Use an array to specify multiple images.
func (*CacheFrom) UnmarshalJSON ¶
UnmarshalJSON for the CacheFrom type
type CommandBase ¶
CommandBase represents lifecycle commands that can be set up to fire in response to several lifecycle events.
If String is non-nil, its value will be run in a shell. If StringArray is not empty, its values will be run as a single command without shell.
func (*CommandBase) UnmarshalJSON ¶
func (c *CommandBase) UnmarshalJSON(data []byte) error
UnmarshalJSON for the CommandBase type
type DevcontainerConfig ¶
type DevcontainerConfig struct {
// Docker build-related options.
Build *BuildOptions `json:"build,omitempty"`
// The location of the context folder for building the Docker image. The path is relative to
// the folder containing the `devcontainer.json` file.
Context *string `json:"context,omitempty"`
// The location of the Dockerfile that defines the contents of the container. The path is
// relative to the folder containing the `devcontainer.json` file.
DockerFile *string `json:"dockerFile,omitempty"`
// The docker image that will be used to create the container.
Image *string `json:"image,omitempty"`
// Application ports that are exposed by the container. This can be a single port or an
// array of ports. Each port can be a number or a string. A number is mapped to the same
// port on the host. A string is passed to Docker unchanged and can be used to map ports
// differently, e.g. "8000:8010".
AppPort *AppPort `json:"appPort,omitempty"`
// Whether to overwrite the command specified in the
// image. Defaults to false if referencing a Composer project;
// otherwise, defaults to true.
OverrideCommand *bool `json:"overrideCommand,omitempty"`
// The arguments required when starting in the container.
RunArgs []string `json:"runArgs,omitempty"`
// Action to take when the user disconnects from the container in their editor. The default
// is to stop the container or Composer services.
ShutdownAction *ShutdownAction `json:"shutdownAction,omitempty"`
// The path of the workspace folder inside the container. This is typically the target path
// of a volume mount in the docker-compose.yml.
WorkspaceFolder *string `json:"workspaceFolder,omitempty"`
// The --mount parameter for docker run. The default is to mount the project folder at
// /workspaces/$project.
WorkspaceMount *string `json:"workspaceMount,omitempty"`
// The name of the docker-compose file(s) used to start the services.
DockerComposeFile *DockerComposeFile `json:"dockerComposeFile,omitempty"`
// An array of services that should be started and stopped.
RunServices []string `json:"runServices,omitempty"`
// The service you want to work on. This is considered the primary container for your dev
// environment which your editor will connect to.
Service *string `json:"service,omitempty"`
// The JSON schema of the `devcontainer.json` file.
Schema *string `json:"$schema,omitempty"`
AdditionalProperties map[string]interface{} `json:"additionalProperties,omitempty"`
// Passes docker capabilities to include when creating the dev container.
CapAdd []string `json:"capAdd,omitempty"`
// Container environment variables.
ContainerEnv EnvVarMap `json:"containerEnv,omitempty"`
// The user the container will be started with. The default is the user on the Docker image.
ContainerUser *string `json:"containerUser,omitempty"`
// Tool-specific configuration. Each tool should use a JSON object subproperty with a unique
// name to group its customizations.
Customizations map[string]interface{} `json:"customizations,omitempty"`
// Features to add to the dev container.
Features FeatureMap `json:"features,omitempty"`
// Ports that are forwarded from the container to the local machine. Can be an integer port
// number, or a string of the format "host:port_number".
ForwardPorts ForwardPorts `json:"forwardPorts,omitempty"`
// Host hardware requirements.
HostRequirements *HostRequirements `json:"hostRequirements,omitempty"`
// Passes the --init flag when creating the dev container.
Init *bool `json:"init,omitempty"`
// A command to run locally (i.e Your host machine, cloud VM) before anything else. This
// command is run before "onCreateCommand". If this is a single string, it will be run in a
// shell. If this is an array of strings, it will be run as a single command without shell.
// If this is an object, each provided command will be run in parallel.
InitializeCommand *LifecycleCommand `json:"initializeCommand,omitempty"`
// Mount points to set up when creating the container. See Docker's documentation for the
// --mount option for the supported syntax.
Mounts []*MobyMount `json:"mounts,omitempty"`
// A name for the dev container which can be displayed to the user.
Name *string `json:"name,omitempty"`
// A command to run when creating the container. This command is run after
// "initializeCommand" and before "updateContentCommand". If this is a single string, it
// will be run in a shell. If this is an array of strings, it will be run as a single
// command without shell. If this is an object, each provided command will be run in
// parallel.
OnCreateCommand *LifecycleCommand `json:"onCreateCommand,omitempty"`
OtherPortsAttributes *PortAttributes `json:"otherPortsAttributes,omitempty"`
// Array consisting of the Feature ID (without the semantic version) of Features in the
// order the user wants them to be installed.
OverrideFeatureInstallOrder []string `json:"overrideFeatureInstallOrder,omitempty"`
PortsAttributes map[string]PortAttributes `json:"portsAttributes,omitempty"`
// A command to run when attaching to the container. This command is run after
// "postStartCommand". If this is a single string, it will be run in a shell. If this is an
// array of strings, it will be run as a single command without shell. If this is an object,
// each provided command will be run in parallel.
PostAttachCommand *LifecycleCommand `json:"postAttachCommand,omitempty"`
// A command to run after creating the container. This command is run after
// "updateContentCommand" and before "postStartCommand". If this is a single string, it will
// be run in a shell. If this is an array of strings, it will be run as a single command
// without shell. If this is an object, each provided command will be run in parallel.
PostCreateCommand *LifecycleCommand `json:"postCreateCommand,omitempty"`
// A command to run after starting the container. This command is run after
// "postCreateCommand" and before "postAttachCommand". If this is a single string, it will
// be run in a shell. If this is an array of strings, it will be run as a single command
// without shell. If this is an object, each provided command will be run in parallel.
PostStartCommand *LifecycleCommand `json:"postStartCommand,omitempty"`
// Passes the --privileged flag when creating the dev container.
Privileged *bool `json:"privileged,omitempty"`
// Remote environment variables to set for processes spawned in the container including
// lifecycle scripts and any remote editor/IDE server process.
RemoteEnv EnvVarMap `json:"remoteEnv,omitempty"`
// The username to use for spawning processes in the container including lifecycle scripts
// and any remote editor/IDE server process. The default is the same user as the container.
RemoteUser *string `json:"remoteUser,omitempty"`
// Recommended secrets for this dev container. Recommendations are provided as environment
// variable keys with optional metadata.
Secrets *Secrets `json:"secrets,omitempty"`
// Passes docker security options to include when creating the dev container.
SecurityOpt []string `json:"securityOpt,omitempty"`
// A command to run when creating the container and rerun when the workspace content was
// updated while creating the container. This command is run after "onCreateCommand" and
// before "postCreateCommand". If this is a single string, it will be run in a shell. If
// this is an array of strings, it will be run as a single command without shell. If this is
// an object, each provided command will be run in parallel.
UpdateContentCommand *LifecycleCommand `json:"updateContentCommand,omitempty"`
// Controls whether on Linux the container's user should be updated with the local user's
// UID and GID. On by default when opening from a local folder.
UpdateRemoteUserUID *bool `json:"updateRemoteUserUID,omitempty"`
// User environment probe to run. The default is "loginInteractiveShell".
UserEnvProbe *UserEnvProbe `json:"userEnvProbe,omitempty"`
// The user command to wait for before continuing execution in the background while the UI
// is starting up. The default is "updateContentCommand".
WaitFor *WaitFor `json:"waitFor,omitempty"`
}
DevcontainerConfig represents the contents of a devcontainer.json file.
type DevcontainerFeatureConfig ¶
type DevcontainerFeatureConfig struct {
// Passes docker capabilities to include when creating the dev container.
CapAdd []string `json:"capAdd,omitempty"`
// Container environment variables.
ContainerEnv EnvVarMap `json:"containerEnv,omitempty"`
// Tool-specific configuration. Each tool should use a JSON object subproperty with a unique
// name to group its customizations.
Customizations map[string]interface{} `json:"customizations,omitempty"`
// An object of Feature dependencies that must be satisified before this Feature is
// installed. Elements follow the same semantics of the features object in devcontainer.json
DependsOn FeatureMap `json:"dependsOn,omitempty"`
// Indicates that the Feature is deprecated, and will not receive any further
// updates/support. This property is intended to be used by the supporting tools for
// highlighting Feature deprecation.
Deprecated *bool `json:"deprecated,omitempty"`
// Description of the Feature. For the best appearance in an implementing tool, refrain from
// including markdown or HTML in the description.
Description *string `json:"description,omitempty"`
// URL to documentation for the Feature.
DocumentationURL *string `json:"documentationURL,omitempty"`
// Entrypoint script that should fire at container start up.
Entrypoint *string `json:"entrypoint,omitempty"`
// ID of the Feature. The id should be unique in the context of the repository/published
// package where the feature exists and must match the name of the directory where the
// devcontainer-feature.json resides.
ID string `json:"id"`
// Adds the tiny init process to the container (--init) when the Feature is used.
Init *bool `json:"init,omitempty"`
// Array of ID's of Features that should execute before this one. Allows control for feature
// authors on soft dependencies between different Features.
InstallsAfter []string `json:"installsAfter,omitempty"`
// List of strings relevant to a user that would search for this definition/Feature.
Keywords []string `json:"keywords,omitempty"`
// Array of old IDs used to publish this Feature. The property is useful for renaming a
// currently published Feature within a single namespace.
LegacyIDs []string `json:"legacyIds,omitempty"`
// URL to the license for the Feature.
LicenseURL *string `json:"licenseURL,omitempty"`
// Mounts a volume or bind mount into the container.
Mounts []*MobyMount `json:"mounts,omitempty"`
// Display name of the Feature.
Name *string `json:"name,omitempty"`
// A command to run when creating the container. This command is run after
// "initializeCommand" and before "updateContentCommand". If this is a single string, it
// will be run in a shell. If this is an array of strings, it will be run as a single
// command without shell. If this is an object, each provided command will be run in
// parallel.
OnCreateCommand *LifecycleCommand `json:"onCreateCommand,omitempty"`
// Possible user-configurable options for this Feature. The selected options will be passed
// as environment variables when installing the Feature into the container.
Options FeatureOptions `json:"options,omitempty"`
// A command to run when attaching to the container. This command is run after
// "postStartCommand". If this is a single string, it will be run in a shell. If this is an
// array of strings, it will be run as a single command without shell. If this is an object,
// each provided command will be run in parallel.
PostAttachCommand *LifecycleCommand `json:"postAttachCommand,omitempty"`
// A command to run after creating the container. This command is run after
// "updateContentCommand" and before "postStartCommand". If this is a single string, it will
// be run in a shell. If this is an array of strings, it will be run as a single command
// without shell. If this is an object, each provided command will be run in parallel.
PostCreateCommand *LifecycleCommand `json:"postCreateCommand,omitempty"`
// A command to run after starting the container. This command is run after
// "postCreateCommand" and before "postAttachCommand". If this is a single string, it will
// be run in a shell. If this is an array of strings, it will be run as a single command
// without shell. If this is an object, each provided command will be run in parallel.
PostStartCommand *LifecycleCommand `json:"postStartCommand,omitempty"`
// Sets privileged mode (--privileged) for the container.
Privileged *bool `json:"privileged,omitempty"`
// Sets container security options to include when creating the container.
SecurityOpt []string `json:"securityOpt,omitempty"`
// A command to run when creating the container and rerun when the workspace content was
// updated while creating the container. This command is run after "onCreateCommand" and
// before "postCreateCommand". If this is a single string, it will be run in a shell. If
// this is an array of strings, it will be run as a single command without shell. If this is
// an object, each provided command will be run in parallel.
UpdateContentCommand *LifecycleCommand `json:"updateContentCommand,omitempty"`
// The version of the Feature. Follows the semanatic versioning (semver) specification.
Version string `json:"version"`
}
Development Container Features Metadata (devcontainer-feature.json). See https://containers.dev/implementors/features/ for more information.
type DevcontainerFeatureParser ¶
type DevcontainerFeatureParser struct {
Config DevcontainerFeatureConfig
Parent *DevcontainerParser
Parser
}
func NewDevcontainerFeatureParser ¶
func NewDevcontainerFeatureParser(configPath string, parent *DevcontainerParser) (p *DevcontainerFeatureParser, err error)
func (*DevcontainerFeatureParser) Parse ¶
func (p *DevcontainerFeatureParser) Parse() error
func (*DevcontainerFeatureParser) SetOption ¶
func (p *DevcontainerFeatureParser) SetOption(name string, value *FeatureValue) error
type DevcontainerParser ¶
type DevcontainerParser struct {
Config DevcontainerConfig // The parsed contents of the target devcontainer.json
DevcontainerID *string // The runtime-specific ID for the devcontainer; not available until after it's created
EnvProbeNeeded bool // Helper flag to keep track of whether or not a probe has been performed to populate the envVars* fields
EnvVarsContainer map[string]string // A map of environment variables available to the container's intended interactive user; used when interpolating containerEnv:* values
EnvVarsRemote map[string]string // A map of environment variables available to tooling meant to interact with the devcontainer; used when interpolating remoteEnv:* values
Parser
}
A DevcontainerParser contains metadata about a target devcontainer.json file, as well as the configuration for the intended devcontainer itself.
func NewDevcontainerParser ¶
func NewDevcontainerParser(configPath string) (p *DevcontainerParser, err error)
NewDevcontainerParser returns a DevcontainerParser targeting a devcontainer.json via filepath. A few fields are initialized, and the returned DevcontainerParser is ready to perform additional operations.
func (*DevcontainerParser) ExpandEnv ¶
func (p *DevcontainerParser) ExpandEnv(v string) string
ExpandEnv is a thin wrapper around shell.Expand() that converts special devcontainer spec variables so they are more easily parsed like a regular shell variable.
The devcontainer spec has special variable lookups that indicate scope (the `localEnv:`, `containerEnv:`, and the undocumented `env:` prefixes); unforunately, they also conflict with well-established shell parameter expansion rules.
When parsing strings that could conceivably contain env vars using these prefixes, transform them to a form that lets them be passed to shell.Expand() while still keeping the other expansion capabilities.
func (*DevcontainerParser) Parse ¶
func (p *DevcontainerParser) Parse() error
Parse the contents of the target devcontainer.json into a struct.
Will refuse to parse unless the contents are determined to conform to the official JSON Schema spec.
Substitutions aren't performed on env vars ($FOO) at this stage, as it's not necessary for a config file to be considered valid.
TODO: Add support for other parts of the spec. (Ongoing)
func (*DevcontainerParser) ProcessSubstitutions ¶
func (p *DevcontainerParser) ProcessSubstitutions()
ProcessSubstitutions performs interpolation on values that can contain them.
This is a separate function so it's possible to set up a backing for the variables. It's also exposed so it can be triggered outside of the usual parsing cycle.
type DockerComposeFile ¶
type DockerComposeFile []string
DockerComposeFile contains wither a path or an ordered list of paths to Docker Compose files relative to the devcontainer.json file.
Using an array is useful when extending your Docker Compose configuration. The order of the array matters since the contents of later files can override values set in previous ones.
func (*DockerComposeFile) UnmarshalJSON ¶
func (d *DockerComposeFile) UnmarshalJSON(data []byte) error
UnmarshalJSON for the DockerComposeFile type
type FeatureMap ¶
type FeatureMap map[string]FeatureValues
FeatureMap is a key-value map of devcontainer Features required by the current configuration.
type FeatureOption ¶
type FeatureOption struct {
// Default value if the user omits this option from their configuration.
Default *FeatureValue `json:"default"`
// Value as set by the parent devcontainer configuration, if any;
// references Default unless overridden via SetOption
Value *FeatureValue
// A description of the option displayed to the user by a supporting tool.
Description *string `json:"description,omitempty"`
// The type of the option. Can be 'boolean' or 'string'. Options of type 'string' should
// use the 'enum' or 'proposals' property to provide a list of allowed values.
Type FeatureOptionType `json:"type"`
// Allowed values for this option. Unlike 'proposals', the user cannot provide a custom
// value not included in the 'enum' array.
Enum []string `json:"enum,omitempty"`
// Suggested values for this option. Unlike 'enum', the 'proposals' attribute indicates the
// installation script can handle arbitrary values provided by the user.
Proposals []string `json:"proposals,omitempty"`
}
FeatureOption value is represented with a boolean value.
type FeatureOptionType ¶
type FeatureOptionType string
FeatureOptionType is a union type denoting how a FeatureOption should be processed.
const ( FeatureOptionTypeBoolean FeatureOptionType = "boolean" FeatureOptionTypeString FeatureOptionType = "string" )
type FeatureOptions ¶
type FeatureOptions map[string]*FeatureOption
FeatureOptions is a key-value map of options supported by this particular Feature.
type FeatureValue ¶
FeatureValue are possible options to be passed to a devcontainer feature's install.sh entrypoint.
func (*FeatureValue) UnmarshalJSON ¶
func (f *FeatureValue) UnmarshalJSON(data []byte) error
UnmarshalJSON for the FeatureOptions type
type FeatureValues ¶
type FeatureValues map[string]FeatureValue
FeatureValues is a key-value map of values for options that are to be passed to a Feature's installation script
func (*FeatureValues) UnmarshalJSON ¶
func (f *FeatureValues) UnmarshalJSON(data []byte) error
type ForwardPorts ¶
type ForwardPorts []string
ForwardPorts is an array of port numbers that are forwarded from the container to the local machine.
Can be an integer port number, or a string of the format "host:port_number".
func (*ForwardPorts) UnmarshalJSON ¶
func (f *ForwardPorts) UnmarshalJSON(data []byte) error
UnmarshalJSON for the ForwardPort type
type GPUClass ¶
type GPUClass struct {
// Number of required cores.
Cores *int64 `json:"cores,omitempty"`
// Amount of required RAM in bytes. Supports units tb, gb, mb and kb.
Memory *string `json:"memory,omitempty"`
}
GPUClass indicates whether a GPU is required.
The string "optional" indicates that a GPU is optional. An object value can be used to configure more detailed requirements.
type GPUEnum ¶
type GPUEnum string
GPUEnum represents the possible string values for the field
const (
Optional GPUEnum = "optional"
)
Supported values for GPUEnum
type HostRequirements ¶
type HostRequirements struct {
// Number of required CPUs.
Cpus *int64 `json:"cpus,omitempty"`
GPU *GPUUnion `json:"gpu,omitempty"`
// Amount of required RAM in bytes. Supports units tb, gb, mb and kb.
Memory *string `json:"memory,omitempty"`
// Amount of required disk space in bytes. Supports units tb, gb, mb and kb.
Storage *string `json:"storage,omitempty"`
}
HostRequirements represent hardware requirements of the devcontainer.
type LifecycleCommand ¶
type LifecycleCommand struct {
CommandBase
ParallelCommands *map[string]CommandBase
}
LifecycleCommand represents commands that can be set up to fire in response to several lifecycle events.
If String is non-nil, its value will be run in a shell. If StringArray is not empty, its values will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
func (*LifecycleCommand) UnmarshalJSON ¶
func (l *LifecycleCommand) UnmarshalJSON(data []byte) error
UnmarshalJSON for the LifecycleCommand type
type MobyMount ¶
MobyMount is a thin wrapper around the Moby Mount struct to allow writing an unmarshaller.
func (*MobyMount) UnmarshalJSON ¶
UnmarshalJSON for the MobyMount type
type OnAutoForward ¶
type OnAutoForward string
OnAutoForward defines the action that occurs when the port is discovered for automatic forwarding
const ( OnAutoForwardIgnore OnAutoForward = "ignore" OnAutoForwardNotify OnAutoForward = "notify" OnAutoForwardOpenBrowser OnAutoForward = "openBrowser" OnAutoForwardOpenPreview OnAutoForward = "openPreview" OnAutoForwardSilent OnAutoForward = "silent" )
Supported values for OnAutoForward
type Parser ¶
type Parser struct {
Filepath string // Path to the target JSON file
IsValidConfig bool // Whether or not the contents of the JSON file conforms to its corresponding spec
// contains filtered or unexported fields
}
A Parser contains information about a JSON configuration necessary to validate it against its corresponding JSON Schema spec.
func NewParser ¶
NewParser returns a Parser that can be built on by providing a JSON Schema so that validation can be performed.
func (*Parser) Validate ¶
Validate runs the contents of the target devcontainer.json against a snapshot of the devcontainer spec's official JSON Schema.
A successful validation operation returns err == nil and sets p.IsValidConfig accordingly. Until after this is run, the value of p.IsValidConfig should not be considered definitive.
type PortAttributes ¶
type PortAttributes struct {
// Automatically prompt for elevation (if needed) when this port is forwarded. Elevate is
// required if the local port is a privileged port.
ElevateIfNeeded *bool `json:"elevateIfNeeded,omitempty"`
// Label that will be shown in the UI for this port.
Label *string `json:"label,omitempty"`
// Defines the action that occurs when the port is discovered for automatic forwarding
OnAutoForward *OnAutoForward `json:"onAutoForward,omitempty"`
// The protocol to use when forwarding this port.
Protocol *Protocol `json:"protocol,omitempty"`
RequireLocalPort *bool `json:"requireLocalPort,omitempty"`
}
PortAttributes represent configuration that should be applied to a port binding specified in forwardPorts.
type Protocol ¶
type Protocol string
Protocol specifies the protocol to use when forwarding a given port.
const ( ProtocolHTTP Protocol = "http" ProtocolHTTPS Protocol = "https" // This isn't one of the explicitly defined values for this field, // but the spec states that if this field is unset, // imeplementations are expected to behave as though it's set to // "tcp" ProtocolTCP Protocol = "tcp" )
Supported values for Protocol
type Secrets ¶
type Secrets struct{}
Secrets represent recommended secrets for this dev container. Recommendations are provided as environment variable keys with optional metadata.
type ShutdownAction ¶
type ShutdownAction string
ShutdownAction represents the action to take when the user disconnects from the container in their editor. The default is to stop the container.
Action to take when the user disconnects from the primary container in their editor. The default is to stop all of the compose containers.
const ( ShutdownActionNone ShutdownAction = "none" ShutdownActionStopCompose ShutdownAction = "stopCompose" ShutdownActionStopContainer ShutdownAction = "stopContainer" )
Supported values for ShutdownAction
type UserEnvProbe ¶
type UserEnvProbe string
UserEnvProbe specifies the environment probe to run.
The default is "loginInteractiveShell".
const ( UserEnvProbeInteractiveShell UserEnvProbe = "interactiveShell" UserEnvProbeLoginInteractiveShell UserEnvProbe = "loginInteractiveShell" UserEnvProbeLoginShell UserEnvProbe = "loginShell" UserEnvProbeUserEnvProbeNone UserEnvProbe = "none" )
Suppported values for UserEnvProbe
type WaitFor ¶
type WaitFor string
WaitFor represents the user command to wait for before continuing execution in the background while the UI is starting up.
The default is "updateContentCommand".
const ( WaitForInitializeCommand WaitFor = "initializeCommand" WaitForOnCreateCommand WaitFor = "onCreateCommand" WaitForPostCreateCommand WaitFor = "postCreateCommand" WaitForPostStartCommand WaitFor = "postStartCommand" WaitForUpdateContentCommand WaitFor = "updateContentCommand" )
Supported values for WaitFor