docker

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerWatchLogs

func ContainerWatchLogs(ctx context.Context, name string, writer io.Writer) error

ContainerWatchLogs pipe logs from the container instance

func GetContainer

func GetContainer(name string) (*types.ContainerJSON, error)

GetContainer return container info by name

func GetEventsChannel

func GetEventsChannel() <-chan ContainerEvent

GetEventsChannel return the main channel reporting docker events

func GetNetwork

func GetNetwork(networkID string) (*types.NetworkResource, error)

GetNetwork inspect a network by networkID

func ListenEvents

func ListenEvents(cfg *model.Config) <-chan ContainerEvent

ListenEvents watches docker events an handle state modifications

func StartContainer

func StartContainer(name string, cfg *model.Config) error

StartContainer start a container

func StopContainer

func StopContainer(name string) error

StopContainer stop a container

Types

type ContainerEvent

type ContainerEvent struct {
	ID      string
	Name    string
	Action  string
	Message events.Message
}

ContainerEvent store a container event

Jump to

Keyboard shortcuts

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