Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildContainerLogChannel ¶
func BuildContainerLogChannel(ctx context.Context, client *client.Client, containerID string) (<-chan string, error)
BuildContainerLogChannel accepts a pointer to a Docker client.Client and a container ID and returns a string channel that provides all events from the container's standard output and error streams.
func BuildContainerLogChannels ¶
func BuildContainerLogChannels(ctx context.Context, client *client.Client, containerID string) (stdout, stderr <-chan string, err error)
BuildContainerLogChannels accepts a pointer to a Docker client.Client and a container ID and returns tww string channels, one that provides all events emitted by the container's standard output stream, and a second for standard error.
Types ¶
type Worker ¶
type Worker struct { CommandParameters []string DockerClient *client.Client DockerHost string EntryPoint string ExitStatus chan int64 ExecutionTimeout time.Duration ImageName string }
Worker represents a container executor. It has a lifetime of a single command execution.
func NewWorker ¶
func NewWorker(image string, tag string, entryPoint string, commandParams ...string) (*Worker, error)
NewWorker will build and returns a new Worker for a single command execution.
Click to show internal directories.
Click to hide internal directories.