scaffold

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package scaffold parses docker-compose.yml files and generates stackup.yml configs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(composeFilePath, exampleFile string) (string, error)

Generate creates a stackup.yml configuration from a docker-compose.yml file, auto-detecting health check types for known images.

func ParseServices

func ParseServices(composeFilePath string) (map[string][]string, error)

ParseServices reads a docker-compose.yml and returns a map of service name to its dependency list.

func ParseServicesRich

func ParseServicesRich(composeFilePath string) (map[string][]Dependency, error)

ParseServicesRich reads a docker-compose.yml and returns dependencies with conditions. This allows stackup to understand if compose already expects service_healthy checks.

Types

type Dependency

type Dependency struct {
	Service   string
	Condition string // "service_started", "service_healthy", "service_completed_successfully"
}

Dependency represents a service dependency with its condition.

type HealthDefault

type HealthDefault struct {
	Type string
	Host string
	Port int
}

HealthDefault holds the detected health check configuration for a known image.

func DetectHealthDefault

func DetectHealthDefault(image string) *HealthDefault

DetectHealthDefault checks if the image name contains any known pattern. Returns nil if no match found.

Jump to

Keyboard shortcuts

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