Documentation ¶
Overview ¶
Package docker integrates with the Docker Remote API https://docs.docker.com/reference/api/docker_remote_api_v1.20/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerScheduler ¶
DockerScheduler stores information and state we need for communicating with Docker remote API We keep track of each container so that we have their identities to stop them when we need to
func NewScheduler ¶
func NewScheduler(pullImages bool, dockerHost string) *DockerScheduler
NewScheduler creates a new interface to the Docker remote API
func (*DockerScheduler) Cleanup ¶
func (c *DockerScheduler) Cleanup() error
Cleanup gives the scheduler an opportunity to stop anything that needs to be stopped
func (*DockerScheduler) CountAllTasks ¶
func (c *DockerScheduler) CountAllTasks(running *demand.Tasks) error
CountAllTasks checks how many of each task are running
func (*DockerScheduler) InitScheduler ¶
func (c *DockerScheduler) InitScheduler(task *demand.Task) (err error)
InitScheduler gets the images for each task
func (*DockerScheduler) StopStartTasks ¶
func (c *DockerScheduler) StopStartTasks(tasks *demand.Tasks) error
StopStartTasks creates containers if there aren't enough of them, and stop them if there are too many