Documentation
¶
Overview ¶
Package docker runs the runner's throwaway containers and removes everything they leave behind.
Index ¶
- Constants
- type Client
- func (c *Client) Close() error
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) RemoveJob(ctx context.Context, jobID string) error
- func (c *Client) RemoveOrphans(ctx context.Context, keepJobIDs ...string) error
- func (c *Client) Start(ctx context.Context, spec ContainerSpec) (*Container, error)
- type Container
- type ContainerSpec
- type ExecSpec
- type Limits
Constants ¶
const ( LabelRunner = "dev.backproof.runner" LabelJob = "dev.backproof.job" )
Labels carried by every container and volume the runner creates.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client creates and removes the containers of one runner.
func (*Client) RemoveJob ¶
RemoveJob deletes every container and volume labelled with this runner and job.
func (*Client) RemoveOrphans ¶
RemoveOrphans deletes everything labelled with this runner, except what belongs to the given jobs. Other runners on the same Docker host keep their containers.
type Container ¶
type Container struct {
// contains filtered or unexported fields
}
Container is a running throwaway container.
type ContainerSpec ¶
type ContainerSpec struct {
JobID string
Image string
Env []string
Entrypoint []string
Cmd []string
Limits Limits
}
ContainerSpec describes a throwaway container.