compose

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package compose loads Docker Compose files and exposes the service context dockviz needs to explain runtime problems.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	ProjectName string
	WorkingDir  string
	Files       []string
	Services    map[string]ServiceContext
}

Context is the compose information dockviz overlays on top of live Docker daemon data.

func Load

func Load(ctx context.Context, workingDir string, paths []string) (*Context, error)

Load discovers and parses compose files. Empty paths means auto-discover from workingDir. Missing files are not fatal: dockviz can still run from daemon labels only.

type ServiceContext

type ServiceContext struct {
	Name          string
	Image         string
	DependsOn     []string
	Dependents    []string
	Networks      []string
	Volumes       []string
	Ports         []string
	CPUs          float64
	MemoryLimitMB float64
	Restart       string
}

ServiceContext describes the service-level blast radius of a running container: dependencies, dependents, networks, volumes, and configured limits.

Jump to

Keyboard shortcuts

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