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

projectloader

package
v5.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package projectloader obtains a Compose project: either by loading and validating the Compose files (LoadProject), or by generating one from existing containers (Generate).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceOfContainer

func ServiceOfContainer(services types.Services, ctr container.Summary) (string, types.ServiceConfig)

ServiceOfContainer returns the name and the definition of the service a container belongs to, within the services collected so far, with the container counted in its scale. A container which is not from a Compose application is a service of its own.

Types

type Backend

type Backend interface {
	// APIClient talks to the Docker daemon, to read the containers to generate a project from.
	APIClient() client.APIClient
	// CLI is the Docker CLI, which resolves the remote (Git, OCI) Compose files.
	CLI() command.Cli
}

Backend is what loading or generating a project needs from the engine.

type Service

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

Service loads and generates projects on a Backend.

func New

func New(backend Backend) *Service

New creates a Service working with the given Backend.

func (*Service) Generate

func (s *Service) Generate(ctx context.Context, options api.GenerateOptions) (*types.Project, error)

func (*Service) LoadProject

func (s *Service) LoadProject(ctx context.Context, options api.ProjectLoadOptions) (*types.Project, error)

LoadProject implements api.Compose.LoadProject It loads and validates a Compose project from configuration files.

Jump to

Keyboard shortcuts

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