Documentation
¶
Index ¶
Constants ¶
View Source
const ( NoTimeout time.Duration = -1 SEDefault = "" SEUnconfined = "unconfined" // NetBridge is the default network mode. No ports are exposed to the // outside world and other containers are only accessible via IP. NetBridge Network = 0 // NetNone disables all network access in the container except to localhost. NetNone Network = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct { // Dockerfile is the Dockerfile used to construct the container. Dockerfile string // Files holds the set of files to be transferred into the build context. Files FileSet // Cmd is the shell command to execute inside the container. Cmd string // Timeout represents the timeout for the container to exit after // it has been spawned. A Timeout < 0 means there is no timeout. // If the timeout is reached before the container exits on its own, // Execute will return a TimeoutError. Timeout time.Duration // Seccomp is the security profile used to constrain system calls made // from the container to the Linux kernel. The default profile is // provided by docker. Seccomp string // Net is the network mode for the container. The default mode // is a bridge network. Net Network // Stdout and Stderr specify the container's standard output and standard error. // // If either is nil, output will be written to the null device. // // If Stdout == Stderr, at most one goroutine at a time will call Write. Stdout io.Writer Stderr io.Writer // contains filtered or unexported fields }
Executor represents a non-reusable sandbox for executing a command.
type File ¶
type File struct { Path string io.ReadCloser }
File associates a path with readable data, used in a FileSet to create a build context for a container environment.
type FileSet ¶
FileSet is a list of files used to create a build context for a container environment.
type Network ¶
type Network int
Network is a network mode for a container. See the constant definitions for descriptions of valid network modes.
type TimeoutError ¶
type TimeoutError string
TimeoutError represents an error with a container finishing its command execution, given its timeout.
func (TimeoutError) Error ¶
func (t TimeoutError) Error() string
Click to show internal directories.
Click to hide internal directories.