Documentation ¶
Index ¶
- Constants
- type BuildMetrics
- type DockerVM
- func (vm *DockerVM) GetVMName(ccid ccintf.CCID) string
- func (vm *DockerVM) GetVMNameForDocker(ccid ccintf.CCID) (string, error)
- func (vm *DockerVM) HealthCheck(ctx context.Context) error
- func (vm *DockerVM) Start(ccid ccintf.CCID, args, env []string, filesToUpload map[string][]byte, ...) error
- func (vm *DockerVM) Stop(ccid ccintf.CCID, timeout uint, dontkill bool, dontremove bool) error
- type Provider
Constants ¶
const ContainerType = "DOCKER"
ContainerType is the string which the docker container type is registered with the container.VMController
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildMetrics ¶ added in v1.4.0
func NewBuildMetrics ¶ added in v1.4.0
func NewBuildMetrics(p metrics.Provider) *BuildMetrics
type DockerVM ¶
type DockerVM struct { PeerID string NetworkID string BuildMetrics *BuildMetrics // contains filtered or unexported fields }
DockerVM is a vm. It is identified by an image id
func NewDockerVM ¶
func NewDockerVM(peerID, networkID string, buildMetrics *BuildMetrics) *DockerVM
NewDockerVM returns a new DockerVM instance
func (*DockerVM) GetVMName ¶
GetVMName generates the VM name from peer information. It accepts a format function parameter to allow different formatting based on the desired use of the name.
func (*DockerVM) GetVMNameForDocker ¶ added in v1.2.0
GetVMNameForDocker formats the docker image from peer information. This is needed to keep image (repository) names unique in a single host, multi-peer environment (such as a development environment). It computes the hash for the supplied image name and then appends it to the lowercase image name to ensure uniqueness.
func (*DockerVM) HealthCheck ¶ added in v1.4.0
HealthCheck checks if the DockerVM is able to communicate with the Docker daemon.
type Provider ¶ added in v1.2.0
type Provider struct { PeerID string NetworkID string BuildMetrics *BuildMetrics }
Provider implements container.VMProvider
func NewProvider ¶ added in v1.2.0
NewProvider creates a new instance of Provider