events

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

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 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 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"
	// 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 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