utils

package
v0.0.0-...-c036721 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDockerImage

func FindDockerImage(imageName string) (bool, error)

FindDockerImage returns whether an image name was found in the local registry

func GetContainerIP

func GetContainerIP(containerID string) (string, error)

GetContainerIP inspects the container and returns its IP address

func PullImage

func PullImage(imageName string) error

func StartContainer

func StartContainer(containerName string, containerConfig *container.Config,
	hostConfig *container.HostConfig) (string, error)

StartContainer with given image, name and configuration

func StartEtcdContainer

func StartEtcdContainer(imageName string, containerName string) (string, error)

StartEtcdContainer starts an Etcd container and waits for the healthcheck

func StartRedisContainer

func StartRedisContainer(imageName string, containerName string) (string, error)

StartRedisContainer starts a Redis container and waits for the healthcheck

func StartZkContainer

func StartZkContainer(imageName string, containerName string) (string, error)

StartZkContainer downloads the image and starts a Zk container

Types

type ComposeConf

type ComposeConf struct {
	ProjectName string
	FilePath    string
	Variables   map[string]string
}

func (*ComposeConf) ListContainers

func (c *ComposeConf) ListContainers() ([]string, error)

ListContainers lists the running container IDs

func (*ComposeConf) Start

func (c *ComposeConf) Start() ([]byte, error)

Start runs a docker-compose configuration

func (*ComposeConf) Stop

func (c *ComposeConf) Stop() ([]byte, error)

Stop stops a running docker-compose configuration

Jump to

Keyboard shortcuts

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