Documentation ¶
Overview ¶
Package compose provides primitives for running Unikraft applications via the Compose specification.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2024, Unikraft GmbH and The KraftKit Authors. Licensed under the BSD-3-Clause License (the "License"). You may not use this file except in compliance with the License.
Index ¶
- Variables
- func NewComposeProjectV1(ctx context.Context, opts ...any) (composev1.ComposeService, error)
- type Project
- func (project *Project) AssignIPs(ctx context.Context) error
- func (project *Project) ServicesOrderedByDependencies(ctx context.Context, services types.Services, expand bool) []types.ServiceConfig
- func (project *Project) ServicesReversedByDependencies(ctx context.Context, services types.Services, expand bool) []types.ServiceConfig
- func (project *Project) Validate(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
var DefaultFileNames = []string{
"docker-compose.yml",
"docker-compose.yaml",
"compose.yml",
"compose.yaml",
"Composefile",
}
DefaultFileNames is a list of default compose file names to look for
Functions ¶
func NewComposeProjectV1 ¶ added in v0.7.4
Types ¶
type Project ¶
func NewProjectFromComposeFile ¶
NewProjectFromComposeFile loads a compose file and returns a project. If no compose file is specified, it will look for one in the current directory.
func (*Project) ServicesOrderedByDependencies ¶ added in v0.8.7
func (project *Project) ServicesOrderedByDependencies(ctx context.Context, services types.Services, expand bool) []types.ServiceConfig
ServicesOrderedByDependencies receives a list of services and generates a new list ordered by dependencies. If expand is set, it will also include dependencies not present in the original list.
func (*Project) ServicesReversedByDependencies ¶ added in v0.8.7
func (project *Project) ServicesReversedByDependencies(ctx context.Context, services types.Services, expand bool) []types.ServiceConfig
ServicesReversedWithDependants receives a list of services and generates a new list reverse ordered by dependencies. If expand is set, it will also include dependendants not present in the original list.