Documentation ¶
Index ¶
- type Compose
- func (c Compose) Command(ctx context.Context, arg ...string) *exec.Cmd
- func (c Compose) Down(ctx context.Context) error
- func (c Compose) GetConfig(ctx context.Context) ([]byte, error)
- func (c Compose) GetPort(ctx context.Context, service string, port int) (int, error)
- func (c Compose) Pull(ctx context.Context, args []string) error
- func (c Compose) RunTestfuncOrExecGoTest(ctx context.Context, testName string, testFunc func()) error
- func (c Compose) Up(ctx context.Context, service ...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 a call to docker-compose.
func NewCompose ¶
func NewCompose(ctx context.Context, prefix, mode string) (cmp *Compose, cleanup func() error, err error)
NewCompose returns a new Compose and cleanup function given a context, prefix, and mode.
func (Compose) Command ¶
Command makes an *exec.Cmd that calls `docker-compose` with the right arguments and environment.
Command is intended to be a helper function. It is exported mainly so `dkt` can use it.
func (Compose) GetConfig ¶
GetConfig calls `docker-compose config` and returns the aggregated Compose file.
func (Compose) GetPort ¶
GetPort runs `docker-compose port` and returns the public port for a service's port binding.
Click to show internal directories.
Click to hide internal directories.