container

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID   string
	Name string
	Addr string
}

Container is generic container descriptor containing only business domain relevant fields

func (Container) String

func (c Container) String() string

type Event

type Event struct {
	Type      EventType
	Container Container
}

Event represents generic container event

func (Event) String

func (e Event) String() string

type EventHandler

type EventHandler func(event Event)

EventHandler represents container event handler function type

type EventType

type EventType int

EventType represents type of container event within business domain

const (
	// EventContainerStarted indicates container has started and ready to be added to DNS
	EventContainerStarted EventType = iota
	// EventContainerStopped indicates container has stopped and should be removed from DNS
	EventContainerStopped EventType = iota
)

type Watcher

type Watcher interface {
	Start() error
	Stop() error
}

Watcher represents generic container event Watcher, it should be possible to create any impl for it (e.g. docker, rkt)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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