Documentation
¶
Overview ¶
Package compose provides emulation and interfaces for Docker Compose that are aware of "x-mutagen" extensions.
Index ¶
Constants ¶
const ( // MutagenServiceName is the name used for the Mutagen service in // Mutagen-enhanced Docker Compose Projects. MutagenServiceName = "mutagen" // MutagenProfileName is the name use for the Mutagen profile in // Mutagen-enhanced Docker Compose Projects. MutagenProfileName = "mutagen_internal" )
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command prepares (but does not start) a Docker Compose command with the specified arguments and scoped to lifetime of the provided context.
func CommandPath ¶
CommandPath returns the absolute path specification to use for invoking Docker Compose. It will use the MUTAGEN_DOCKER_COMPOSE_PATH environment variable if provided, otherwise falling back to a standard os/exec.LookPath implementation.
Types ¶
type Project ¶
type Project struct { // Forwarding are the forwarding session specifications. Forwarding map[string]*forwardingsvc.CreationSpecification // Synchronization are the synchronization session specifications. Synchronization map[string]*synchronizationsvc.CreationSpecification // contains filtered or unexported fields }
Project encodes metadata for a Mutagen-enhanced Docker Compose project.
func LoadProject ¶
func LoadProject(projectFlags ProjectFlags, daemonFlags docker.DaemonConnectionFlags) (*Project, error)
LoadProject computes Docker Compose project metadata, loads the project's configuration files, extracts Mutagen session definitions from "x-mutagen" extensions, and generates temporary files containing Mutagen image and service definitions. The logic of this loading is a simplified (but faithful) emulation of Docker Compose's loading implementation, roughly modeling the logic of the project_from_options function. Callers should invoke Dispose on the resulting project if loading is successful.
func (*Project) SessionSelection ¶
SessionSelection returns a Mutagen session selection that uses a label selector to identify sessions associated with the project.
func (*Project) TopLevelFlags ¶
TopLevelFlags returns a slice of top-level project flags (namely -f/--file, -p/--project-name, --project-directory, and --env-file) with fully resolved values.
type ProjectFlags ¶
type ProjectFlags struct { // File stores the value(s) of the -f/--file flag(s). File []string // ProjectName stores the value of the -p/--project-name flag. ProjectName string // ProjectDirectory stores the value of the --project-directory flag. ProjectDirectory string // EnvFile stores the value of the --env-file flag. EnvFile string }
ProjectFlags encodes top-level Docker Compose command line flags that control the Docker Compose project. This type is designed to be used as command line flag storage. The zero value of this structure is a valid value corresponding to the absence of any of these flags.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
configuration
Package configuration provides support for loading individual Compose YAML files that contain x-mutagen attributes and generating Compose YAML files.
|
Package configuration provides support for loading individual Compose YAML files that contain x-mutagen attributes and generating Compose YAML files. |