override

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(proj compose.Project, services []ClassifiedService) ([]byte, error)

Generate produces the override YAML for the given project and classified services. HTTP ports get Traefik labels + tug network; TCP ports get deterministic port remapping with !override to replace (not append) the original ports.

Types

type ClassifiedPort

type ClassifiedPort struct {
	ContainerPort uint16
	Kind          ServiceKind
	HostPort      uint16 // assigned host port (TCP only)
}

ClassifiedPort holds a single port with its classification and resolved host port.

type ClassifiedService

type ClassifiedService struct {
	compose.Service

	ClassifiedPorts []ClassifiedPort
}

ClassifiedService holds a service with per-port classification.

func Classify

func Classify(proj compose.Project, cfg config.Config) ([]ClassifiedService, error)

Classify categorizes each port of each service as HTTP or TCP. Priority: config port override > config service-level kind > well-known port detection > HTTP default.

type ServiceKind

type ServiceKind int

ServiceKind indicates how tug should handle a port.

const (
	KindHTTP ServiceKind = iota
	KindTCP
)

func (ServiceKind) String

func (k ServiceKind) String() string

Jump to

Keyboard shortcuts

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