Documentation
¶
Index ¶
- type AppStatus
- type DockerClient
- type DockerManager
- func (m *DockerManager) Logs(ctx context.Context, tail int) ([]string, error)
- func (m *DockerManager) Restart(ctx context.Context, cfg *plugin.AppConfig) error
- func (m *DockerManager) Start(ctx context.Context, cfg *plugin.AppConfig) error
- func (m *DockerManager) Status(ctx context.Context) (*AppStatus, error)
- func (m *DockerManager) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient interface {
EnsureImage(ctx context.Context, image string) error
CreateContainer(ctx context.Context, config *docker.ContainerConfig) (string, error)
StartContainer(ctx context.Context, containerID string) error
StopContainer(ctx context.Context, containerID string, timeout *int) error
RemoveContainer(ctx context.Context, containerID string, force bool) error
ListContainersByLabels(ctx context.Context, labels map[string]string) ([]types.Container, error)
GetContainerLogs(ctx context.Context, containerID string, tail int) (string, error)
}
DockerClient is the subset of *docker.Client used by the DockerManager.
type DockerManager ¶
type DockerManager struct {
// contains filtered or unexported fields
}
DockerManager runs the application under test as a Docker container. Like the mock services, the container is labelled so separate CLI invocations can find it again.
func NewDockerManager ¶
func NewDockerManager(dockerClient DockerClient, logger *zap.Logger) *DockerManager
NewDockerManager creates a Docker-backed app manager.
func (*DockerManager) Start ¶
Start launches the application container. It fails if an application is already running.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package nativeapp runs the app under test as native processes: it starts the project binaries built into $GOPATH/bin as detached processes, each on an incrementing port with the emulator host env vars, and stops them again.
|
Package nativeapp runs the app under test as native processes: it starts the project binaries built into $GOPATH/bin as detached processes, each on an incrementing port with the emulator host env vars, and stops them again. |
Click to show internal directories.
Click to hide internal directories.