compose

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: AGPL-3.0 Imports: 13 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 {
	// contains filtered or unexported fields
}

Compose represents the runtime.Runtime implementation for docker-compose based environments.

func NewCompose

func NewCompose(dir string) (*Compose, error)

NewCompose creates a new compose runtime.

func NewEmptyCompose

func NewEmptyCompose(dir string) *Compose

NewEmptyCompose creates a Compose service without any initialization.

func (*Compose) AddService

func (c *Compose) AddService(recipe recipe.Service) (runtime.Service, error)

AddService implements runtime.Runtime.

func (*Compose) Get

func (c *Compose) Get(service runtime.ServiceInstance, name string) string

Get implements runtime.Runtime.

func (*Compose) GetHost

func (c *Compose) GetHost(service runtime.ServiceInstance, hostType string) string

GetHost implements runtime.Runtime.

func (*Compose) GetPort

func (c *Compose) GetPort(service runtime.ServiceInstance, portType string) runtime.PortMap

GetPort implements runtime.Runtime.

func (*Compose) GetServices

func (c *Compose) GetServices() []runtime.Service

GetServices implements runtime.Runtime.

func (*Compose) Reload

func (c *Compose) Reload(stack recipe.Stack) error

Reload implements runtime.Runtime.

func (*Compose) Write

func (c *Compose) Write() error

Write implements runtime.Runtime.

type Service

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

Service is the implementation of runtime.Service for Docker compose files.

func (*Service) AddConfig

func (s *Service) AddConfig(key string, value string) error

AddConfig implements runtime.Runtime.

func (*Service) AddEnvironment

func (s *Service) AddEnvironment(key string, value string) error

AddEnvironment registers new environment variable to be used. For normal configs, use AddConfig to be more general.

func (*Service) AddFlag

func (s *Service) AddFlag(flag string) error

AddFlag implements runtime.Service.

func (*Service) AddNetwork added in v1.2.1

func (s *Service) AddNetwork(networkAlias string) error

AddNetwork implements runtime.ManageableNetwork.

func (*Service) AddPortForward

func (s *Service) AddPortForward(ports runtime.PortMap) error

AddPortForward implements runtime.Service.

func (*Service) ChangeImage

func (s *Service) ChangeImage(ch func(string) string) error

ChangeImage implements runtime.Service.

func (*Service) GetENV

func (s *Service) GetENV() map[string]*string

GetENV implements runtime.Service.

func (*Service) GetVolumes

func (s *Service) GetVolumes() (mounts []runtime.VolumeMount)

GetVolumes implements runtime.Service.

func (*Service) ID

ID implements runtime.Service.

func (*Service) Labels

func (s *Service) Labels() []string

Labels implements runtime.Service.

func (*Service) Persist

func (s *Service) Persist(dir string) error

Persist implements runtime.Service.

func (*Service) RemoveFlag

func (s *Service) RemoveFlag(flag string) error

RemoveFlag implements runtime.Service.

func (*Service) RemoveNetwork added in v1.2.1

func (s *Service) RemoveNetwork(networkAlias string) error

RemoveNetwork implements runtime.ManageableNetwork.

func (*Service) RemovePortForward added in v1.2.0

func (s *Service) RemovePortForward(ports runtime.PortMap) error

RemovePortForward implements runtime.Service.

func (*Service) TransformRaw

func (s *Service) TransformRaw(apply func(config *types.ServiceConfig) error) error

TransformRaw enables to apply transformations on original raw docker service.

func (*Service) UseFile

func (s *Service) UseFile(path string, name string, data string) error

UseFile implements runtime.Service.

func (*Service) UseFolder

func (s *Service) UseFolder(path string, name string) error

UseFolder implements runtime.Service.

Jump to

Keyboard shortcuts

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