workflow

package
v0.0.0-...-76e9b25 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccessor

func NewAccessor(request *tools.APIRequest) *workflowMongoAccessor

func NewAccessorHistory

func NewAccessorHistory(request *tools.APIRequest) *workflowMongoAccessor

func NewHistory

func NewHistory() *workflowHistoryMongoAccessor

New creates a new instance of the workspaceMongoAccessor

Types

type Deps

type Deps struct {
	Source string
	Dest   string
}
type Related struct {
	Node  resources.ResourceInterface
	Links []graph.GraphLink
}

type Workflow

type Workflow struct {
	utils.AbstractObject // AbstractObject contains the basic fields of an object (id, name)
	resources.ResourceSet
	Graph          *graph.Graph `bson:"graph,omitempty" json:"graph,omitempty"` // Graph UI & logic representation of the workflow
	ScheduleActive bool         `json:"schedule_active" bson:"schedule_active"` // ScheduleActive is a flag that indicates if the schedule is active, if not the workflow is not scheduled and no execution or booking will be set
	// Schedule       *WorkflowSchedule `bson:"schedule,omitempty" json:"schedule,omitempty"` // Schedule is the schedule of the workflow
	Shared []string `json:"shared,omitempty" bson:"shared,omitempty"` // Shared is the ID of the shared workflow     // AbstractWorkflow contains the basic fields of a workflow
}

* Workflow is a struct that represents a workflow * it defines the native workflow

func (*Workflow) CheckBooking

func (wfa *Workflow) CheckBooking(caller *tools.HTTPCaller) (bool, error)

* CheckBooking is a function that checks the booking of the workflow on peers (even ourselves)

func (*Workflow) GetAccessor

func (d *Workflow) GetAccessor(request *tools.APIRequest) utils.Accessor

func (*Workflow) GetByRelatedProcessing

func (w *Workflow) GetByRelatedProcessing(processingID string, g func(item graph.GraphItem) bool) map[string]Related

func (*Workflow) GetDependencies

func (w *Workflow) GetDependencies(id string) (dependencies []Deps)

func (*Workflow) GetGraphItems

func (w *Workflow) GetGraphItems(f func(item graph.GraphItem) bool) (list_datas []graph.GraphItem)

func (*Workflow) GetItemsByResources

func (w *Workflow) GetItemsByResources() map[tools.DataType]map[string][]string

Returns a map of DataType (processing,computing,data,storage,worfklow) where each resource (identified by its UUID) is mapped to the list of its items (different appearance) in the graph ex: if the same Minio storage is represented by several nodes in the graph, in tools.STORAGE_RESSOURCE its UUID will be mapped to the list of GraphItem ID that correspond to the ID of each node

func (*Workflow) GetPricedItem

func (w *Workflow) GetPricedItem(
	f func(item graph.GraphItem) bool, request *tools.APIRequest, buyingStrategy int, pricingStrategy int) map[string]pricing.PricedItemITF

func (*Workflow) IsDependancy

func (w *Workflow) IsDependancy(id string) []Deps

func (*Workflow) Planify

func (wf *Workflow) Planify(start time.Time, end *time.Time, request *tools.APIRequest) (float64, map[tools.DataType]map[string]pricing.PricedItemITF, *Workflow, error)

func (*Workflow) VerifyAuth

func (ao *Workflow) VerifyAuth(request *tools.APIRequest) bool

type WorkflowHistory

type WorkflowHistory struct{ Workflow }

func (*WorkflowHistory) GenerateID

func (r *WorkflowHistory) GenerateID()

func (*WorkflowHistory) GetAccessor

func (d *WorkflowHistory) GetAccessor(request *tools.APIRequest) utils.Accessor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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