Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartCommandString ¶
func StartCommandString(containerName string, req *ContainerArgs) string
StartCommandString prints the command used in Start to spin up a container Uses the same underlying logic as Start to ensure we always print an accurate string
Types ¶
type Client ¶
type Client interface { Pull(ctx context.Context, imageName string, timeout time.Duration) error Start(ctx context.Context, containerName string, req *ContainerArgs, timeout time.Duration) (*StartResponse, error) IsUp(ctx context.Context, containerName string) (bool, error) Remove(ctx context.Context, containerName string, force bool) error Exec(ctx context.Context, containerName string, req *ExecRequest) (*ExecResponse, error) IPAddress(ctx context.Context, containerName string) (string, error) CopyTo(ctx context.Context, containerName string, sourcePath, destinationPath string) error CopyFrom(ctx context.Context, containerName string, sourcePath, destinationPath string) error PrintAll(ctx context.Context) error }
Client wraps interface to docker communication.
type ContainerArgs ¶
type ContainerArgs struct { // Run container in detached mode. // Detached container are not wait till the process will be finished. Detached bool ImageName string PublishPorts []string ExposePorts []string EnvVar []string Volumes []string Network string Privileged bool Exec []string }
ContainerArgs holds info to start container.
type ExecRequest ¶
ExecRequest holds data to perform request.
type ExecResponse ¶
type ExecResponse struct { // Exit code of execution. // Negative exit codes are reserved for internal use. ExitCode int Stdout string Stderr string }
ExecResponse holds result of the execution.
type StartResponse ¶
type StartResponse struct { // Exit code of execution. // Negative exit codes are reserved for internal use. ExitCode int Stdout string Stderr string }
StartResponse holds result data from starting the container.
Click to show internal directories.
Click to hide internal directories.