events

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 21 Imported by: 1 module, 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionName

type ActionName string
const (
	R_ADD           ActionName = "R_ADD"
	R_DEL           ActionName = "R_DEL"
	R_DEPLOY_START  ActionName = "R_DEPLOY_START"
	R_DEPLOY_FAIL   ActionName = "R_DEPLOY_FAIL"
	R_DEPLOY_CANCEL ActionName = "R_DEPLOY_CANCEL"
	R_DEPLOY_OK     ActionName = "R_DEPLOY_OK"
)

type ActivityPublisher

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

func (*ActivityPublisher) OnEvent

func (p *ActivityPublisher) OnEvent(event *RuntimeEvent)

type DeployErrorCollector

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

func (*DeployErrorCollector) OnEvent

func (c *DeployErrorCollector) OnEvent(event *RuntimeEvent)

type DeployPusher

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

func (*DeployPusher) OnEvent

func (p *DeployPusher) OnEvent(event *RuntimeEvent)

type DeployTimeCollector

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

func (*DeployTimeCollector) OnEvent

func (c *DeployTimeCollector) OnEvent(event *RuntimeEvent)

type EventListener

type EventListener interface {
	OnEvent(e *RuntimeEvent)
}

func NewActivityPublisher

func NewActivityPublisher(manager *EventManager) *EventListener

func NewDeployErrorCollector

func NewDeployErrorCollector(manager *EventManager, db *dbclient.DBClient, bdl *bundle.Bundle) *EventListener

func NewDeployPusher

func NewDeployPusher(manager *EventManager, queue *queue.PusherQueue) *EventListener

func NewDeployTimeCollector

func NewDeployTimeCollector(manager *EventManager, db *dbclient.DBClient) *EventListener

func NewEventboxPublisher

func NewEventboxPublisher(manager *EventManager) *EventListener

func NewWsPublisher

func NewWsPublisher(manager *EventManager) *EventListener

type EventManager

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

func NewEventManager

func NewEventManager(cap int, queue *queue.PusherQueue, db *dbclient.DBClient, bdl *bundle.Bundle) *EventManager

func (*EventManager) EmitEvent

func (m *EventManager) EmitEvent(e *RuntimeEvent)

func (*EventManager) Start

func (m *EventManager) Start()

type EventName

type EventName string
const (
	// create
	RuntimeCreated EventName = "RuntimeCreated"
	// delete
	RuntimeDeleting     EventName = "RuntimeDeleting"
	RuntimeDeleted      EventName = "RuntimeDeleted"
	RuntimeDeleteFailed EventName = "RuntimeDeleteFailed"
	// runtime status
	RuntimeStatusChanged EventName = "RuntimeStatusChanged"
	// service
	RuntimeServiceStatusChanged    EventName = "RuntimeServiceStatusChanged"
	RuntimeServiceInstancesChanged EventName = "RuntimeServiceInstancesChanged"
	// deploy
	RuntimeDeployStart         EventName = "RuntimeDeployStart"
	RuntimeDeployStatusChanged EventName = "RuntimeDeployStatusChanged"
	RuntimeDeployFailed        EventName = "RuntimeDeployFailed"
	RuntimeDeployCanceling     EventName = "RuntimeDeployCanceling"
	RuntimeDeployCanceled      EventName = "RuntimeDeployCanceled"
	RuntimeDeployCancelFailed  EventName = "RuntimeDeployCancelFailed"
	RuntimeDeployOk            EventName = "RuntimeDeployOk"
)

type EventboxPublisher

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

func (*EventboxPublisher) OnEvent

func (p *EventboxPublisher) OnEvent(event *RuntimeEvent)

type RuntimeEvent

type RuntimeEvent struct {
	EventName EventName              `json:"eventName"`
	Operator  string                 `json:"operator"`
	Runtime   *apistructs.RuntimeDTO `json:"runtime,omitempty"`
	// only used for RuntimeService* events
	Service *apistructs.RuntimeServiceDTO `json:"service,omitempty"`
	// only used for RuntimeServiceInstancesChanged
	Instances []*apistructs.RuntimeInstanceDTO `json:"instance,omitempty"`
	// only used for RuntimeDeploy* events
	Deployment *apistructs.Deployment `json:"deployment,omitempty"`
}

type WsPublisher

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

func (*WsPublisher) OnEvent

func (p *WsPublisher) OnEvent(event *RuntimeEvent)

Jump to

Keyboard shortcuts

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