docker

package
v0.0.0-...-33bb219 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

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

type DockerScheduler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL