Documentation ¶
Index ¶
- func ForwardLogs(r io.ReadCloser, ws ...io.Writer)
- func WrapStart(cmd *exec.Cmd, loggers ...shared.BaseLogger) error
- func WrapStartDebug(cmd *exec.Cmd, logger *agents.AgentLogger) error
- type ContainerInstance
- type CreateDockerInput
- type DockerImage
- type DockerOption
- type DockerRunner
- func (r *DockerRunner) ContainerReady(name string) (bool, error)
- func (r *DockerRunner) CreateContainer(input CreateDockerInput, opts ...DockerOption) error
- func (r *DockerRunner) EnsureImage(imageName string) error
- func (r *DockerRunner) IP(instance *network.ApplicationEndpointInstance) (string, error)
- func (r *DockerRunner) Start() error
- func (r *DockerRunner) StartContainer(c *ContainerInstance) error
- func (r *DockerRunner) Stop() error
- type Option
- type Runner
- type VolumeMount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForwardLogs ¶
func ForwardLogs(r io.ReadCloser, ws ...io.Writer)
func WrapStartDebug ¶
func WrapStartDebug(cmd *exec.Cmd, logger *agents.AgentLogger) error
Types ¶
type ContainerInstance ¶
type CreateDockerInput ¶
type CreateDockerInput struct { DockerImage ApplicationEndpointInstance *network.ApplicationEndpointInstance }
type DockerImage ¶
type DockerImage struct {
Image string
}
type DockerOption ¶
type DockerOption func(option *Option)
func WithCmd ¶
func WithCmd(cmd ...string) DockerOption
func WithEnvironmentVariable ¶
func WithEnvironmentVariable(key, value string) DockerOption
func WithVolume ¶
func WithVolume(source, target string) DockerOption
type DockerRunner ¶
type DockerRunner struct { Containers []*ContainerInstance AgentLogger *agents.AgentLogger ServiceLogger *agents.ServiceLogger // contains filtered or unexported fields }
func NewDockerRunner ¶
func NewDockerRunner(ctx context.Context, serviceLogger *agents.ServiceLogger, agentLogger *agents.AgentLogger) (*DockerRunner, error)
NewDockerRunner creates a new docker runner
func (*DockerRunner) ContainerReady ¶
func (r *DockerRunner) ContainerReady(name string) (bool, error)
func (*DockerRunner) CreateContainer ¶
func (r *DockerRunner) CreateContainer(input CreateDockerInput, opts ...DockerOption) error
func (*DockerRunner) EnsureImage ¶
func (r *DockerRunner) EnsureImage(imageName string) error
func (*DockerRunner) IP ¶
func (r *DockerRunner) IP(instance *network.ApplicationEndpointInstance) (string, error)
func (*DockerRunner) Start ¶
func (r *DockerRunner) Start() error
func (*DockerRunner) StartContainer ¶
func (r *DockerRunner) StartContainer(c *ContainerInstance) error
func (*DockerRunner) Stop ¶
func (r *DockerRunner) Stop() error
type Option ¶
type Option struct { Cmd []string Volumes []VolumeMount Envs []string }
type Runner ¶
type VolumeMount ¶
Click to show internal directories.
Click to hide internal directories.