compose

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const CaddyExtensionKey = "x-caddy"
View Source
const FakeProjectName = "f-a-k-e"

FakeProjectName is a placeholder name for the project to be able to strip it from the resource names used as prefix.

View Source
const MachinesExtensionKey = "x-machines"
View Source
const PortsExtensionKey = "x-ports"

Variables

This section is empty.

Functions

func LoadProject

func LoadProject(ctx context.Context, paths []string, opts ...composecli.ProjectOptionsFn) (*types.Project, error)

func ServiceSpecFromCompose

func ServiceSpecFromCompose(project *types.Project, serviceName string) (api.ServiceSpec, error)

Types

type Caddy added in v0.11.1

type Caddy struct {
	Config string `yaml:"config" json:"config"`
}

func (*Caddy) DecodeMapstructure added in v0.11.1

func (c *Caddy) DecodeMapstructure(value any) error

DecodeMapstructure decodes x-caddy extension from either a string or an object. When x-caddy is a string, it's mapped directly to the Config field.

type Client

type Client interface {
	api.DNSClient
	deploy.Client
}

type Deployment

type Deployment struct {
	Client       Client
	Project      *types.Project
	SpecResolver *deploy.ServiceSpecResolver
	Strategy     deploy.Strategy
	// contains filtered or unexported fields
}

func NewDeployment

func NewDeployment(ctx context.Context, cli Client, project *types.Project) (*Deployment, error)

func NewDeploymentWithStrategy added in v0.11.0

func NewDeploymentWithStrategy(ctx context.Context, cli Client, project *types.Project, strategy deploy.Strategy) (*Deployment, error)

func (*Deployment) Plan

func (*Deployment) Run

func (d *Deployment) Run(ctx context.Context) error

func (*Deployment) ServiceSpec

func (d *Deployment) ServiceSpec(name string) (api.ServiceSpec, error)

ServiceSpec returns the service specification for the given compose service that is ready for deployment.

type MachinesSource added in v0.10.0

type MachinesSource []string

MachinesSource represents the parsed x-machines extension data as slice of strings

func (*MachinesSource) DecodeMapstructure added in v0.10.0

func (m *MachinesSource) DecodeMapstructure(value interface{}) error

DecodeMapstructure implements custom decoding for multiple input types

type PortsSource

type PortsSource []string

Jump to

Keyboard shortcuts

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