event

package
v0.0.0-...-a23f117 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSelfHttpExchange

func NewSelfHttpExchange() *selfHttpExchange

NewSelfHttpExchange returns an Exchange for posting event to the site itself

Types

type Event

type Event interface {
	// GetUrl returns the url path for the event
	GetUrl() string
}

Event is an interface represent a event for this site

type Exchange

type Exchange interface {
	// PostEvent sends an event
	PostEvent(event Event) error
}

Exchange is an interface to receive and post event

type ModelCreationEvent

type ModelCreationEvent struct {
	Name                   string            `json:"name"`
	ModelID                string            `json:"model_id"`
	ModelVersion           string            `json:"model_version"`
	ComponentName          string            `json:"component_name"`
	ProjectUUID            string            `json:"project_uuid"`
	JobUUID                string            `json:"job_uuid"`
	JobName                string            `json:"job_name"`
	Role                   string            `json:"role"`
	PartyID                uint              `json:"party_id"`
	Evaluation             map[string]string `json:"evaluation"`
	ComponentAlgorithmType uint8             `json:"algorithm_type"`
}

ModelCreationEvent is an event triggered when a modeling job is finished

func (ModelCreationEvent) GetUrl

func (e ModelCreationEvent) GetUrl() string

type ProjectDataSyncEvent

type ProjectDataSyncEvent struct {
	ProjectUUID string `json:"project_uuid"`
}

ProjectDataSyncEvent is an event triggered when project data info needs to be synced from fml manager

func (ProjectDataSyncEvent) GetUrl

func (e ProjectDataSyncEvent) GetUrl() string

type ProjectListSyncEvent

type ProjectListSyncEvent struct {
}

ProjectListSyncEvent is an event triggered when project list needs to be synced

func (ProjectListSyncEvent) GetUrl

func (e ProjectListSyncEvent) GetUrl() string

type ProjectParticipantSyncEvent

type ProjectParticipantSyncEvent struct {
	ProjectUUID string `json:"project_uuid"`
}

ProjectParticipantSyncEvent is an event triggered when project participant info needs to be synced from fml manager

func (ProjectParticipantSyncEvent) GetUrl

type ProjectParticipantUpdateEvent

type ProjectParticipantUpdateEvent struct {
	UUID        string `json:"uuid"`
	PartyID     uint   `json:"party_id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

ProjectParticipantUpdateEvent is an event triggered when project participant info is change

func (ProjectParticipantUpdateEvent) GetUrl

type ProjectSelfUnregistrationEvent

type ProjectSelfUnregistrationEvent struct {
}

ProjectSelfUnregistrationEvent is an event triggered when this site unregistered from the fml manager

func (ProjectSelfUnregistrationEvent) GetUrl

Jump to

Keyboard shortcuts

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