Documentation
¶
Index ¶
- Variables
- type Compose
- func (c *Compose) DoesSvcExist(ws *workspace.Workspace, p *workspace.Project, service string) (bool, error)
- func (c *Compose) Down(ws *workspace.Workspace, p *workspace.Project) error
- func (c *Compose) Exec(ws *workspace.Workspace, p *workspace.Project, service string, ...) error
- func (c *Compose) IsProjectRunning(ws *workspace.Workspace, p *workspace.Project) (bool, error)
- func (c *Compose) IsSvcRunning(ws *workspace.Workspace, p *workspace.Project, service string) (bool, error)
- func (c *Compose) LoadRawSpec(ws *workspace.Workspace, p *workspace.Project) (string, error)
- func (c *Compose) LoadSpec(ws *workspace.Workspace, p *workspace.Project) (*types.Project, error)
- func (c *Compose) Logs(ws *workspace.Workspace, p *workspace.Project, service string) error
- func (c *Compose) Run(ws *workspace.Workspace, p *workspace.Project, service string, ...) error
- func (c *Compose) ServiceNames(p *workspace.Project) ([]string, error)
- func (c *Compose) ShowCommand(ws *workspace.Workspace, p *workspace.Project) error
- func (c *Compose) ShowConfig(ws *workspace.Workspace, p *workspace.Project) error
- func (c *Compose) Up(ws *workspace.Workspace, p *workspace.Project) error
- type ComposeOverlayGenerator
- type ComposeParser
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidValueForOverlayModifier = errors.New("invalid value for overlay modifier")
Functions ¶
This section is empty.
Types ¶
type Compose ¶
type Compose struct {
// contains filtered or unexported fields
}
func NewCompose ¶
func NewCompose(cli cli, tui tui, overlayGenerator composeOverlayGenerator, parser composeParser) *Compose
func (*Compose) DoesSvcExist ¶
func (c *Compose) DoesSvcExist(ws *workspace.Workspace, p *workspace.Project, service string) (bool, error)
TODO: guard against nil arguments
func (*Compose) Exec ¶
func (c *Compose) Exec(ws *workspace.Workspace, p *workspace.Project, service string, cmdArgs []string, output io.Writer) error
Exec runs a command in the service, in its running container. With output, the command isn't attached to a terminal, and what it writes goes to output, e.g. when a hook runs it. Without, it uses the host's terminal, so it can be interactive.
TODO: guard against nil inputs
func (*Compose) IsProjectRunning ¶ added in v0.21.0
IsProjectRunning reports whether any of the project's containers are running. It finds them by their compose project label, so it works without the project's compose files, even for a project that isn't cloned.
func (*Compose) IsSvcRunning ¶
func (c *Compose) IsSvcRunning(ws *workspace.Workspace, p *workspace.Project, service string) (bool, error)
TODO: guard against nil arguments
func (*Compose) LoadRawSpec ¶
TODO: guard against nil arguments
func (*Compose) Run ¶
func (c *Compose) Run(ws *workspace.Workspace, p *workspace.Project, service string, cmdArgs []string, output io.Writer) error
Run runs a command in the service in a new container, removed afterwards. With output, the command isn't attached to a terminal, and what it writes goes to output, e.g. when a hook runs it. Without, it uses the host's terminal, so it can be interactive.
TODO: guard against nil inputs
func (*Compose) ServiceNames ¶ added in v0.20.0
ServiceNames returns the names of the services in the project's compose file, sorted. The file is parsed directly, rather than asking docker, so it's quick, and works when docker isn't running.
func (*Compose) ShowCommand ¶
TODO: guard against nil inputs
func (*Compose) ShowConfig ¶
TODO: guard against nil inputs
type ComposeOverlayGenerator ¶
type ComposeOverlayGenerator struct {
// contains filtered or unexported fields
}
func NewComposeOverlayGenerator ¶
func NewComposeOverlayGenerator(fs afero.Fs, parser overlayComposeParser, overlayDir string, tlsCertsDir string) *ComposeOverlayGenerator
func (*ComposeOverlayGenerator) CreateOrRetrieve ¶
type ComposeParser ¶
type ComposeParser struct {
}
func NewComposeParser ¶
func NewComposeParser() *ComposeParser
Source Files
¶
- compose.go
- compose_does_svc_exist.go
- compose_down.go
- compose_exec.go
- compose_is_project_running.go
- compose_is_svc_running.go
- compose_load_raw_spec.go
- compose_load_spec.go
- compose_logs.go
- compose_parser.go
- compose_run.go
- compose_service_names.go
- compose_show_command.go
- compose_show_config.go
- compose_up.go
- errors.go
- overlays.go