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 (*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.