events

package
v0.14.10 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package events holds event structures, methods and functions.

Index

Constants

View Source
const (
	NoEvent = EventType(iota)

	ContainerCreated = EventType(iota)
	ContainerStarted = EventType(iota)

	ServiceAdd          = EventType(iota)
	ServiceUpStart      = EventType(iota)
	ServiceUpIgnored    = EventType(iota)
	ServiceUp           = EventType(iota)
	ServiceCreateStart  = EventType(iota)
	ServiceCreate       = EventType(iota)
	ServiceDeleteStart  = EventType(iota)
	ServiceDelete       = EventType(iota)
	ServiceDownStart    = EventType(iota)
	ServiceDown         = EventType(iota)
	ServiceRestartStart = EventType(iota)
	ServiceRestart      = EventType(iota)
	ServicePullStart    = EventType(iota)
	ServicePull         = EventType(iota)
	ServiceKillStart    = EventType(iota)
	ServiceKill         = EventType(iota)
	ServiceStartStart   = EventType(iota)
	ServiceStart        = EventType(iota)
	ServiceBuildStart   = EventType(iota)
	ServiceBuild        = EventType(iota)
	ServicePauseStart   = EventType(iota)
	ServicePause        = EventType(iota)
	ServiceUnpauseStart = EventType(iota)
	ServiceUnpause      = EventType(iota)
	ServiceStopStart    = EventType(iota)
	ServiceStop         = EventType(iota)
	ServiceRunStart     = EventType(iota)
	ServiceRun          = EventType(iota)

	VolumeAdd  = EventType(iota)
	NetworkAdd = EventType(iota)

	ProjectDownStart     = EventType(iota)
	ProjectDownDone      = EventType(iota)
	ProjectCreateStart   = EventType(iota)
	ProjectCreateDone    = EventType(iota)
	ProjectUpStart       = EventType(iota)
	ProjectUpDone        = EventType(iota)
	ProjectDeleteStart   = EventType(iota)
	ProjectDeleteDone    = EventType(iota)
	ProjectRestartStart  = EventType(iota)
	ProjectRestartDone   = EventType(iota)
	ProjectReload        = EventType(iota)
	ProjectReloadTrigger = EventType(iota)
	ProjectKillStart     = EventType(iota)
	ProjectKillDone      = EventType(iota)
	ProjectStartStart    = EventType(iota)
	ProjectStartDone     = EventType(iota)
	ProjectBuildStart    = EventType(iota)
	ProjectBuildDone     = EventType(iota)
	ProjectPauseStart    = EventType(iota)
	ProjectPauseDone     = EventType(iota)
	ProjectUnpauseStart  = EventType(iota)
	ProjectUnpauseDone   = EventType(iota)
	ProjectStopStart     = EventType(iota)
	ProjectStopDone      = EventType(iota)
)

Definitions of libcompose events

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerEvent

type ContainerEvent struct {
	Service    string            `json:"service"`
	Event      string            `json:"event"`
	ID         string            `json:"id"`
	Time       time.Time         `json:"time"`
	Attributes map[string]string `json:"attributes"`
	Type       string            `json:"type"`
}

ContainerEvent holds attributes of container events.

type Emitter

type Emitter interface {
	AddListener(c chan<- Event)
}

Emitter defines the methods an event emitter should have.

type Event

type Event struct {
	EventType   EventType
	ServiceName string
	Data        map[string]string
}

Event holds project-wide event informations.

type EventType

type EventType int

EventType defines a type of libcompose event.

func (EventType) String

func (e EventType) String() string

type Notifier

type Notifier interface {
	Notify(eventType EventType, serviceName string, data map[string]string)
}

Notifier defines the methods an event notifier should have.

Jump to

Keyboard shortcuts

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