compose

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ErrCreateStack = strerr.Error("failed to create compose stack")

Variables

This section is empty.

Functions

This section is empty.

Types

type Compose

type Compose struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Opt) *Compose

New creates new Compose dependency. By default it applies tc.Wait(true) and tc.RemoveOrphans(true) options. Those can be overwritten by WithUpOptions and WithDownOptions.

func (*Compose) Ready

func (c *Compose) Ready() error

func (*Compose) Start

func (c *Compose) Start() error

func (*Compose) Stop

func (c *Compose) Stop() error

type Opt

type Opt func(*Compose) error

Opt is option type for OptCompose.

func WithDownOptions

func WithDownOptions(opts ...tc.StackDownOption) Opt

WithDownOptions sets options for compose.Down().

func WithEnv

func WithEnv(env map[string]string) Opt

WithEnv sets environment variables for compose.

func WithFile

func WithFile(file string) Opt

WithFile creates compose stack from file.

func WithOsEnv

func WithOsEnv() Opt

WithOsEnv passes environment from OS to compose.

func WithReadyFn

func WithReadyFn(fn func(tc.ComposeStack) error) Opt

WithReadyFn sets ready function.

func WithStack

func WithStack(s tc.ComposeStack) Opt

WithStack sets ComposeStack.

func WithUpOptions

func WithUpOptions(opts ...tc.StackUpOption) Opt

WithUpOptions sets options for compose.Up().

func WithWaitForService

func WithWaitForService(service string, strategy wait.Strategy) Opt

WithWaitForService makes compose up wait for specific service with given strategy.

Jump to

Keyboard shortcuts

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