event

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: UPL-1.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateModuleIntegrationCascadeEvent

func CreateModuleIntegrationCascadeEvent(log vzlog.VerrazzanoLogger, cli client.Client, sourceEvent *ModuleIntegrationEvent) result.Result

CreateModuleIntegrationCascadeEvent creates a ModuleIntegrationEvent event for a module to integrate other modules

func CreateModuleIntegrationEvent

func CreateModuleIntegrationEvent(log vzlog.VerrazzanoLogger, cli client.Client, module *moduleapi.Module, action Action) result.Result

CreateModuleIntegrationEvent creates a ModuleIntegrationEvent event for a module

func CreateNonCascadingModuleIntegrationEvent

func CreateNonCascadingModuleIntegrationEvent(log vzlog.VerrazzanoLogger, cli client.Client, module *moduleapi.Module, action Action) result.Result

CreateNonCascadingModuleIntegrationEvent creates a ModuleIntegrationEvent event for a module with no cascading

Types

type Action

type Action string

Action is the lifecycle action

const (
	Installed Action = "installed"
	Upgraded  Action = "upgraded"
	Deleted   Action = "deleted"
)

Action constants

type DataKey

type DataKey string

DataKey is a configmap data key

const (
	EventDataKey DataKey = "event"
)

DataKey constants

type EventType

type EventType string

EventType is the type of event

const (
	// IntegrateSingleRequestEvent is a request to integrate a single module
	IntegrateSingleRequestEvent EventType = "integrate-single"

	// IntegrateCascadeRequestEvent is an event request to integrate the other modules except the one
	// in the event payload (since it will already have been integrated)
	IntegrateCascadeRequestEvent EventType = "integrate-cascade"
)

EventType constants

type ModuleIntegrationEvent

type ModuleIntegrationEvent struct {
	EventType
	Action

	// Cascade true indicates that the single-module integration controller should potentially create an
	// event to integrate other modules
	Cascade         bool
	ResourceNSN     types.NamespacedName
	ModuleName      string
	ModuleVersion   string
	TargetNamespace string
}

ModuleIntegrationEvent contains the event data

func ConfigMapToModuleIntegrationEvent

func ConfigMapToModuleIntegrationEvent(log vzlog.VerrazzanoLogger, cm *corev1.ConfigMap) (*ModuleIntegrationEvent, error)

ConfigMapToModuleIntegrationEvent converts an event configmap to a ModuleIntegrationEvent

func NewModuleIntegrationEvent

func NewModuleIntegrationEvent(module *moduleapi.Module, action Action, eventType EventType, cascade bool) *ModuleIntegrationEvent

NewModuleIntegrationEvent creates a ModuleIntegrationEvent event struct for a module

Jump to

Keyboard shortcuts

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