Documentation
¶
Index ¶
- Constants
- Variables
- func PingDocker(_client *client.Client) error
- type Watcher
- func (w *Watcher) Container(id string) *types.ContainerJSON
- func (w *Watcher) Find(visitor func(*types.ContainerJSON) (bool, error)) ([]*types.ContainerJSON, error)
- func (w *Watcher) Ready()
- func (w *Watcher) Start(ctx context.Context) error
- func (w *Watcher) VisitCurrentCointainer(visitor func(container *types.ContainerJSON) error)
- func (w *Watcher) WatchFor(visitor func(action string, container *types.ContainerJSON), labels ...string)
Constants ¶
View Source
const ( START = "start" // Container action STOP = "stop" // Container action DIE = "die" // Container action DESTROY = "destroy" CONTAINER = "container" EVENT = "event" )
Variables ¶
View Source
var (
// DockerTries is the number of retries
DockerTries = 12
)
Functions ¶
func PingDocker ¶
PingDocker ping Docker, try 12 times, wait 5s
Types ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func (*Watcher) Container ¶ added in v0.1.2
func (w *Watcher) Container(id string) *types.ContainerJSON
func (*Watcher) Find ¶ added in v0.1.3
func (w *Watcher) Find(visitor func(*types.ContainerJSON) (bool, error)) ([]*types.ContainerJSON, error)
func (*Watcher) Ready ¶ added in v0.1.4
func (w *Watcher) Ready()
Ready when already here containers are known
func (*Watcher) VisitCurrentCointainer ¶ added in v0.1.1
func (w *Watcher) VisitCurrentCointainer(visitor func(container *types.ContainerJSON) error)
VisitCurrentCointainer visit already present containers
Click to show internal directories.
Click to hide internal directories.