docker

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package docker handles port binding events from docker events API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventMonitor

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

EventMonitor monitors the Docker engine's Event API for container events.

func NewEventMonitor

func NewEventMonitor(portTracker tracker.Tracker) (*EventMonitor, error)

NewEventMonitor creates and returns a new Event Monitor for Docker's event API. Caller is responsible to make sure that Docker engine is up and running.

func (*EventMonitor) Flush added in v0.3.1

func (e *EventMonitor) Flush()

Flush clears all the container port mappings out of the port tracker upon shutdown.

func (*EventMonitor) Info

func (e *EventMonitor) Info(ctx context.Context) error

Info returns information about the docker server it is used to verify that docker engine server is up.

func (*EventMonitor) MonitorPorts

func (e *EventMonitor) MonitorPorts(ctx context.Context)

MonitorPorts scans Docker's event stream API for container start/stop events.

Jump to

Keyboard shortcuts

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