Documentation ¶
Index ¶
- func ContainerToString(container types.Container) string
- func FindContainerFromMountPoint(path string) (types.Container, bool)
- func FindContainersFromMountPoint(path string) (types.Container, bool)
- func GetBaseContainerNamesFromPath(p string) string
- func GetContainerDetails(name string) (types.ContainerJSON, error)
- func GetContainerEnvString(containerName string) string
- func GetContainerMountPoint(container types.Container) string
- func GetContainerName(container types.Container) string
- func GetContainerStats(containerID string) types.ContainerStats
- func GetContainerWebSocket(id string) (types.HijackedResponse, error)
- func GetEventStream() (<-chan events.Message, <-chan error)
- func GetRunningContainers() []types.Container
- func IsNetworkRunning(name string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerToString ¶
ContainerToString : Allows printing of useful info about container
func FindContainerFromMountPoint ¶
FindContainerFromMountPoint : Attempts to find a running container based on a folder path
func FindContainersFromMountPoint ¶
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 ¶
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 ¶
GetContainerEnvString : Return a containers env variables in the format: -e key=value -e key2=value2 ...etc
func GetContainerMountPoint ¶
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 ¶
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 ¶
GetEventStream : return streams for API to emit to frontend
func GetRunningContainers ¶
GetRunningContainers : Returns list of all running containers
func IsNetworkRunning ¶
IsNetworkRunning : Given a network name checks whether it's running or not
Types ¶
This section is empty.