Help us shape the future of Go! Take the 2026 Go Developer Survey

run

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCompose

func LoadCompose(home string, env map[string]string) (*types.Project, *types.ConfigDetails, error)

LoadCompose loads a docker-compose.yml file

Types

type ClosingBuffer

type ClosingBuffer struct {
	*bytes.Buffer
}

ClosingBuffer it's a bytes.Buffer, but closable

func (*ClosingBuffer) Close

func (c *ClosingBuffer) Close() error

type ComposeRun

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

func NewComposeRun

func NewComposeRun(home string, env map[string]string) (*ComposeRun, error)

func (*ComposeRun) Cancel

func (c *ComposeRun) Cancel()

func (*ComposeRun) Id

func (c *ComposeRun) Id() uuid.UUID

func (*ComposeRun) Prepare

func (c *ComposeRun) Prepare(envs map[string]string, volumesRoot string, id uuid.UUID, hosts []string) error

Prepare set a quiet compose environment, waiting for its wake

func (*ComposeRun) PrepareServices added in v0.2.0

func (c *ComposeRun) PrepareServices(hosts []string) error

func (*ComposeRun) PrepareVolumes

func (c *ComposeRun) PrepareVolumes(prependPath string) error

PrepareVolumes by prepending a custom full path and creating the path on the host

func (*ComposeRun) Run

func (c *ComposeRun) Run(stdout io.WriteCloser, stderr io.WriteCloser) (int, error)

Run a compose service, writing the STDOUT and STDERR outputs, returns the UNIX return code

type Context

type Context struct {
	Stdout io.WriteCloser
	Stderr io.WriteCloser
	// contains filtered or unexported fields
}

Context is a run context, with a STDOUT and a STDERR

type Runnable

type Runnable interface {
	Prepare(map[string]string, string, uuid.UUID, []string) error
	Run(stdout io.WriteCloser, stderr io.WriteCloser) (int, error)
	Cancel()
}

type Runner

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

func NewRunner

func NewRunner(servicesDir string, volumesRoot string, hosts []string) (*Runner, error)

func (*Runner) Prepare

func (r *Runner) Prepare(t *task.Task, env map[string]string) (string, error)

Prepare the run Prepare is synchronous, in order to raise an error in the REST endpoint. Prepare checks volumes stuff.

func (*Runner) Run

func (r *Runner) Run(t *task.Task) (int, error)

Jump to

Keyboard shortcuts

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