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

compose

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package compose is the Compose orchestrator: it applies a compose project to one Docker as plain containers, the way docker compose up --wait does, and labels them the way docker compose does, so that docker compose ps and logs still see them.

It drives the daemon with the moby client, not with the docker/compose packages, which pull the legacy docker/docker and docker/cli modules.

Index

Constants

View Source
const Name = "compose"

Name is the value of the nemo-orchestrator parameter that selects Compose.

Variables

This section is empty.

Functions

func New

New connects to the Docker of the target. Compose runs on any Docker, a swarm manager included.

Types

type Orchestrator

type Orchestrator struct {
	// contains filtered or unexported fields
}

Orchestrator applies compose projects to one Docker.

func (*Orchestrator) Close

func (orchestrator *Orchestrator) Close() error

func (*Orchestrator) Install

func (orchestrator *Orchestrator) Install(ctx context.Context, project *installer.Project, opts installer.InstallOptions) error

Install creates what the project declares and is not there yet, the way docker compose up --wait does: volumes, networks, then the containers of the services, level after level. It then deletes the containers of the services the project no longer declares.

func (*Orchestrator) Name

func (orchestrator *Orchestrator) Name() string

func (*Orchestrator) Uninstall

func (orchestrator *Orchestrator) Uninstall(ctx context.Context, project *installer.Project, opts installer.UninstallOptions) error

Uninstall deletes what Install created from the project, as docker compose down does: the containers of its services, dependants first, then its networks, and its volumes when asked. What Install deleted as orphans is not looked for.

func (*Orchestrator) Validate

func (orchestrator *Orchestrator) Validate(project *installer.Project) error

Directories

Path Synopsis
Package convert turns a compose project into what the Compose orchestrator creates on the Docker Engine: the create options of each container, its networks and volumes, and the state to wait for, the way docker compose does.
Package convert turns a compose project into what the Compose orchestrator creates on the Docker Engine: the create options of each container, its networks and volumes, and the state to wait for, the way docker compose does.

Jump to

Keyboard shortcuts

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