|
@@ -37,6 +37,12 @@ type ContainerConfig struct {
|
|
|
Ports []Port
|
|
Ports []Port
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+type LogsRequest struct {
|
|
|
|
|
+ Follow bool
|
|
|
|
|
+ Tail string
|
|
|
|
|
+ Writer io.Writer
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// ContainerService interacts with the underlying container backend
|
|
// ContainerService interacts with the underlying container backend
|
|
|
type ContainerService interface {
|
|
type ContainerService interface {
|
|
|
// List returns all the containers
|
|
// List returns all the containers
|
|
@@ -45,4 +51,6 @@ type ContainerService interface {
|
|
|
Run(ctx context.Context, config ContainerConfig) error
|
|
Run(ctx context.Context, config ContainerConfig) error
|
|
|
// Exec executes a command inside a running container
|
|
// Exec executes a command inside a running container
|
|
|
Exec(ctx context.Context, containerName string, command string, reader io.Reader, writer io.Writer) error
|
|
Exec(ctx context.Context, containerName string, command string, reader io.Reader, writer io.Writer) error
|
|
|
|
|
+ // Logs returns all the logs of a container
|
|
|
|
|
+ Logs(ctx context.Context, containerName string, request LogsRequest) error
|
|
|
}
|
|
}
|