additionalservice

package
v0.0.0-...-555a65a Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const NOTIFY_ANOMALY_SERVICE = "NOTIFY_ANOMALY_SERVICE"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalService

type AdditionalService interface {
	GetService() AdditionalServiceModel
	GetServiceId() string
	GetServiceType() ServiceType
	SaveServiceToDatabase() error
	DeleteServiceFromDatabase() error
	StartService(router *gin.Engine) error
	StopService() error
}

func GetNotifyAnomalyServiceFromDatabase

func GetNotifyAnomalyServiceFromDatabase(serviceId string, eventHandler eventhandler.EventHandler) (AdditionalService, error)

type AdditionalServiceModel

type AdditionalServiceModel struct {
	ServiceDefinition serviceModels.ServiceDefinition
	SystemDefinition  serviceModels.SystemDefinition
	Interfaces        []string
	Metadata          map[string]string
	HasExternalHost   bool
}

type Anomaly

type Anomaly struct {
	AnomalyType string `json:"anomalyType"`
}

type CreateWorkDTO

type CreateWorkDTO struct {
	ProductId string `json:"productId"`
	EventType string `json:"eventType"`
}

type NotifyAnomalyService

type NotifyAnomalyService struct {
	NotifyAnomalyServiceData

	EventService eventhandler.EventService

	OrchestrationConnection orchestrator.OrchestratorConnection
}

func NewNotifyAnomalyService

func NewNotifyAnomalyService(
	anomaly Anomaly,
	systemDefinition servicemodels.SystemDefinition,
	eventService eventhandler.EventService,
	serviceRegistryAddress string,
	serviceRegistryPort int,
	certificateId string,
	truststorePath string,
) (*NotifyAnomalyService, error)

func (*NotifyAnomalyService) DeleteServiceFromDatabase

func (n *NotifyAnomalyService) DeleteServiceFromDatabase() error

func (*NotifyAnomalyService) GetService

func (*NotifyAnomalyService) GetServiceId

func (n *NotifyAnomalyService) GetServiceId() string

func (*NotifyAnomalyService) GetServiceType

func (n *NotifyAnomalyService) GetServiceType() ServiceType

func (*NotifyAnomalyService) SaveServiceToDatabase

func (n *NotifyAnomalyService) SaveServiceToDatabase() error

func (*NotifyAnomalyService) StartService

func (n *NotifyAnomalyService) StartService(router *gin.Engine) error

func (*NotifyAnomalyService) StopService

func (n *NotifyAnomalyService) StopService() error

type NotifyAnomalyServiceData

type NotifyAnomalyServiceData struct {
	ServiceId string `bson:"serviceId"`

	Anomaly          Anomaly                        `bson:"anomaly"`
	SystemDefinition servicemodels.SystemDefinition `bson:"systemDefinition"`

	ServiceRegistryAddress string `bson:"serviceRegistryAddress"`
	ServiceRegistryPort    int    `bson:"serviceRegistryPort"`
	CertificateId          string `bson:"certificateId"`
	TruststorePath         string `bson:"truststorePath"`
}

type ServiceType

type ServiceType string

type Work

type Work struct {
	WorkId string `json:"workId"`

	ProductId string `json:"productId"`
}

type WorkDTO

type WorkDTO struct {
	WorkId string `json:"workId"`

	ProductId string `json:"productId"`
	EventType string `json:"eventType"`
}

type WorkEvent

type WorkEvent struct {
	eventhandlertypes.EventType
	Work
}

func (*WorkEvent) GetEventData

func (w *WorkEvent) GetEventData() map[string]interface{}

func (*WorkEvent) GetEventType

func (w *WorkEvent) GetEventType() eventhandlertypes.EventType

Jump to

Keyboard shortcuts

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