container

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package container deals with the creation of docker containers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleSpawnContainers

func HandleSpawnContainers(ctx context.Context, cli *client.Client, info SpawnInformation) error

HandleSpawnContainers handles the preparation of docker images, removing of old containers and calling the given spawn call async

func SpawnApateletContainers

func SpawnApateletContainers(ctx context.Context, amountOfNodes int, pullPolicy env.PullPolicy, apateletEnv env.ApateletEnvironment) error

SpawnApateletContainers spawns multiple Apatelet Docker containers

func SpawnControlPlaneContainer

func SpawnControlPlaneContainer(ctx context.Context, pullPolicy env.PullPolicy, cpEnv env.ControlPlaneEnvironment) error

SpawnControlPlaneContainer spawns a single control plane container

Types

type SpawnCall

type SpawnCall func(int, context.Context) error

SpawnCall is function which takes in the number of the container, then spawns the container and finally returns any error that might have occurred in the process

type SpawnInformation

type SpawnInformation struct {
	// contains filtered or unexported fields
}

SpawnInformation represents all required information to prepare the docker environment for spawning the containers

func NewSpawnInformation

func NewSpawnInformation(pullPolicy env.PullPolicy, image, containerName string, amount int, callback SpawnCall) SpawnInformation

NewSpawnInformation creates a new SpawnInformation struct using the given information

Jump to

Keyboard shortcuts

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