Documentation
¶
Overview ¶
Package compose provides Docker Compose project processing functionality
Package compose provides Docker Compose file parsing and handling
Index ¶
- Variables
- func LabelConverter(labels types.Labels) []string
- func NameResolver(definedName, keyName string) string
- func OptionsConverter(opts map[string]string) []string
- func ParseComposeFile(path string) (*types.Project, error)
- func ProcessProjects(projects []*types.Project, force bool, existingProcessedUnits map[string]bool, ...) (map[string]bool, error)
- func ReadProjects(path string) ([]*types.Project, error)
- type CleanupOrphanedUnitsFunc
- type ProcessUnitFunc
- type UpdateUnitDatabaseFunc
- type WriteUnitFileFunc
Constants ¶
This section is empty.
Variables ¶
var ( ProcessUnit ProcessUnitFunc = processUnit CleanupOrphanedUnits CleanupOrphanedUnitsFunc = cleanupOrphanedUnits WriteUnitFile WriteUnitFileFunc = fs.WriteUnitFile UpdateUnitDatabase UpdateUnitDatabaseFunc = updateUnitDatabase )
Package variables for testing.
Functions ¶
func LabelConverter ¶ added in v0.9.0
LabelConverter converts compose-style labels to unit labels.
func NameResolver ¶ added in v0.9.0
NameResolver resolves resource names from compose configs.
func OptionsConverter ¶ added in v0.9.0
OptionsConverter converts driver options to unit options.
func ParseComposeFile ¶
ParseComposeFile parses a Docker Compose file at the specified path.
func ProcessProjects ¶ added in v0.16.1
func ProcessProjects(projects []*types.Project, force bool, existingProcessedUnits map[string]bool, doCleanup bool) (map[string]bool, error)
ProcessProjects processes Docker Compose projects and converts them to Podman systemd units. It accepts an existing processedUnits map to track units across multiple repository calls and a cleanup flag to control when orphaned unit cleanup should occur.
Types ¶
type CleanupOrphanedUnitsFunc ¶ added in v0.16.1
type CleanupOrphanedUnitsFunc func(unitRepo repository.Repository, processedUnits map[string]bool) error
CleanupOrphanedUnitsFunc is the function signature for cleaning up orphaned units.
type ProcessUnitFunc ¶ added in v0.16.1
type ProcessUnitFunc func(unitRepo repository.Repository, unitItem *unit.QuadletUnit, force bool, processedUnits map[string]bool, changedUnits *[]unit.QuadletUnit) error
ProcessUnitFunc is the function signature for processing a single quadlet unit.
type UpdateUnitDatabaseFunc ¶ added in v0.16.1
type UpdateUnitDatabaseFunc func(unitRepo repository.Repository, unitItem *unit.QuadletUnit, content string) error
UpdateUnitDatabaseFunc is the function signature for updating the unit database.
type WriteUnitFileFunc ¶ added in v0.16.1
WriteUnitFileFunc is the function signature for writing a unit file.