docker

package
v0.0.0-...-38cc344 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerToString

func ContainerToString(container types.Container) string

ContainerToString : Allows printing of useful info about container

func FindContainerFromMountPoint

func FindContainerFromMountPoint(path string) (types.Container, bool)

FindContainerFromMountPoint : Attempts to find a running container based on a folder path

func FindContainersFromMountPoint

func FindContainersFromMountPoint(path string) (types.Container, bool)

FindContainersFromMountPoint : Attempts to find all running containers related to a folder path The method is assuming the container names will have the same prefix as the container associated to the mount path.

func GetBaseContainerNamesFromPath

func GetBaseContainerNamesFromPath(p string) string

GetBaseContainerNamesFromPath : Normalizes the base folder of provided path to same format as docker-compose usage Source: https://github.com/docker/compose/blob/7ae632a9ee7530fcf81e212baa3e588f477ea862/compose/cli/command.py#L131

func GetContainerDetails

func GetContainerDetails(name string) (types.ContainerJSON, error)

GetContainerDetails : Returns details about the running container or an error

func GetContainerEnvString

func GetContainerEnvString(containerName string) string

GetContainerEnvString : Return a containers env variables in the format: -e key=value -e key2=value2 ...etc

func GetContainerMountPoint

func GetContainerMountPoint(container types.Container) string

GetContainerMountPoint : Given a container attempts to determine it's mount point. If there are multiple mount points it will only return the first

func GetContainerName

func GetContainerName(container types.Container) string

GetContainerName : Given a container name returns that container object

func GetContainerStats

func GetContainerStats(containerID string) types.ContainerStats

GetContainerStats : Given a container id returns stats for it

func GetContainerWebSocket

func GetContainerWebSocket(id string) (types.HijackedResponse, error)

GetContainerWebSocket : return a socket connection to container

func GetEventStream

func GetEventStream() (<-chan events.Message, <-chan error)

GetEventStream : return streams for API to emit to frontend

func GetRunningContainers

func GetRunningContainers() []types.Container

GetRunningContainers : Returns list of all running containers

func IsNetworkRunning

func IsNetworkRunning(name string) bool

IsNetworkRunning : Given a network name checks whether it's running or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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