event

package
v0.0.0-...-33ac69c Latest Latest
Warning

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

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

Documentation

Overview

Package event contains spate events.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// ID of the event.
	ID string
	// Type of the event.
	Type Type
	// Service relevant to the event.
	Service swarm.Service
}

Event represents some incident.

func New

func New(t Type, srv swarm.Service) Event

New creates a new event.

type Type

type Type string

Type represents some category of events.

const (
	// TypeServiceCreated indicates a service creation event.
	TypeServiceCreated Type = "service_created"
	// TypeServiceUpdated indicates a service update event.
	TypeServiceUpdated Type = "service_updated"
	// TypeServiceDeleted indicates a service deletion event.
	TypeServiceDeleted Type = "service_deleted"
	// TypeServiceScaledUp indicates a service scale up event.
	TypeServiceScaledUp Type = "service_scaled_up"
	// TypeServiceScaledDown indicates a service scale down event.
	TypeServiceScaledDown Type = "service_scaled_down"
)

Jump to

Keyboard shortcuts

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