docker

package
v0.0.0-...-bed98e0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotGetContainerIPAddress = errors.New("can not get container ip address")

ErrCannotGetContainerIPAddress signals that for some reason all attempts to resolve container's ip have failed

Functions

This section is empty.

Types

type Watcher

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

Watcher is a docker event watcher, which listens for relevant container-related events (e.g. start/stop)

func NewWatcher

func NewWatcher(handler container.EventHandler, logger *log.Logger) (*Watcher, error)

NewWatcher constructs a new watcher using docker client constructed from environment

func (*Watcher) Start

func (w *Watcher) Start() error

Start loads initial list of containers and starts listening to container-related events

func (*Watcher) Stop

func (w *Watcher) Stop() error

Stop closes client and stops event listening loop

Jump to

Keyboard shortcuts

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