Documentation ¶
Index ¶
- type Compose
- func (c *Compose) AddService(recipe recipe.Service) (runtime.Service, error)
- func (c *Compose) Get(service runtime.ServiceInstance, name string) string
- func (c *Compose) GetHost(service runtime.ServiceInstance, hostType string) string
- func (c *Compose) GetPort(service runtime.ServiceInstance, portType string) runtime.PortMap
- func (c *Compose) GetServices() []runtime.Service
- func (c *Compose) Reload(stack recipe.Stack) error
- func (c *Compose) Write() error
- type Service
- func (s *Service) AddConfig(key string, value string) error
- func (s *Service) AddEnvironment(key string, value string) error
- func (s *Service) AddFlag(flag string) error
- func (s *Service) AddNetwork(networkAlias string) error
- func (s *Service) AddPortForward(ports runtime.PortMap) error
- func (s *Service) ChangeImage(ch func(string) string) error
- func (s *Service) GetENV() map[string]*string
- func (s *Service) GetVolumes() (mounts []runtime.VolumeMount)
- func (s *Service) ID() runtime.ServiceInstance
- func (s *Service) Labels() []string
- func (s *Service) Persist(dir string) error
- func (s *Service) RemoveFlag(flag string) error
- func (s *Service) RemoveNetwork(networkAlias string) error
- func (s *Service) RemovePortForward(ports runtime.PortMap) error
- func (s *Service) TransformRaw(apply func(config *types.ServiceConfig) error) error
- func (s *Service) UseFile(path string, name string, data string) error
- func (s *Service) UseFolder(path string, name string) error
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 ¶
NewCompose creates a new compose runtime.
func NewEmptyCompose ¶
NewEmptyCompose creates a Compose service without any initialization.
func (*Compose) AddService ¶
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) GetServices ¶
GetServices 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) AddEnvironment ¶
AddEnvironment registers new environment variable to be used. For normal configs, use AddConfig to be more general.
func (*Service) AddNetwork ¶ added in v1.2.1
AddNetwork implements runtime.ManageableNetwork.
func (*Service) AddPortForward ¶
AddPortForward implements runtime.Service.
func (*Service) ChangeImage ¶
ChangeImage implements runtime.Service.
func (*Service) GetVolumes ¶
func (s *Service) GetVolumes() (mounts []runtime.VolumeMount)
GetVolumes implements runtime.Service.
func (*Service) RemoveFlag ¶
RemoveFlag implements runtime.Service.
func (*Service) RemoveNetwork ¶ added in v1.2.1
RemoveNetwork implements runtime.ManageableNetwork.
func (*Service) RemovePortForward ¶ added in v1.2.0
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.