events

package
v1.4.2-patch Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ContainerCreated       = "Created"
	ContainerFailed        = "Failed"
	ContainerMigrated      = "Migrated"
	ContainerMigratedByDrs = "MigratedByDrs"
	ContainerPoweredOff    = "PoweredOff"
	ContainerPoweredOn     = "PoweredOn"
	ContainerReconfigured  = "Reconfigured"
	ContainerRelocated     = "Relocated"
	ContainerRemoved       = "Removed"
	ContainerResumed       = "Resumed"
	ContainerShutdown      = "Shutdown"
	ContainerStarted       = "Started"
	ContainerStopped       = "Stopped"
	ContainerSuspended     = "Suspended"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEvent

type BaseEvent struct {
	Type        EventType
	Event       string
	ID          string
	Detail      string
	Ref         string
	CreatedTime time.Time
}

func (*BaseEvent) Created

func (be *BaseEvent) Created() time.Time

func (*BaseEvent) EventID

func (be *BaseEvent) EventID() string

func (*BaseEvent) Message

func (be *BaseEvent) Message() string

func (*BaseEvent) Reference

func (be *BaseEvent) Reference() string

func (*BaseEvent) String

func (be *BaseEvent) String() string

return event type / description

type ContainerEvent

type ContainerEvent struct {
	*BaseEvent
}

func (*ContainerEvent) Topic

func (ce *ContainerEvent) Topic() string

type Event

type Event interface {
	EventTopic
	// id of event
	EventID() string
	// event (PowerOn, PowerOff, etc)
	String() string
	// reference evented object
	Reference() string
	// event message
	Message() string

	Created() time.Time
}

type EventTopic

type EventTopic interface {
	Topic() string
}

type EventType

type EventType string

func NewEventType

func NewEventType(kind interface{}) EventType

NewEventType utility function that uses reflection to return the event type

func (EventType) Topic

func (t EventType) Topic() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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