compose

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compose

type Compose struct {
	Name     string              `yaml:"-"`
	Version  string              `yaml:"version"`
	Services map[string]*Service `yaml:"services,omitempty"`
	Path     string              `yaml:"-"`
	OnStart  func() error        `yaml:"-"`
}

func NewCompose

func NewCompose(name string, opts ...Opt) *Compose

func (*Compose) AddService

func (c *Compose) AddService(name, image string, opts ...ServiceOpt)

func (*Compose) Run

func (c *Compose) Run() error

type Opt

type Opt func(*Compose)

type Service

type Service struct {
	Name        string               `yaml:"-"`
	Image       string               `yaml:"image,omitempty"`
	Command     string               `yaml:"command,omitempty"`
	Environment map[string]string    `yaml:"environment,omitempty"`
	Ports       []string             `yaml:"ports,omitempty"`
	Volumes     []string             `yaml:"volumes,omitempty"`
	WaitFunc    func(*Service) error `yaml:"-"`
}

func (*Service) Wait

func (svc *Service) Wait() error

type ServiceOpt

type ServiceOpt func(*Service)

Jump to

Keyboard shortcuts

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