Documentation ¶
Index ¶
- func New() *workflowMongoAccessor
- func NewHistory() *workflowHistoryMongoAccessor
- type AbstractWorkflow
- func (w *AbstractWorkflow) GetComputeByRelatedProcessing(processingID string) []*compute.ComputeResource
- func (w *AbstractWorkflow) GetProcessings() (list_computings []graph.GraphItem)
- func (w *AbstractWorkflow) GetStoragesByRelatedProcessing(processingID string) []*storage.StorageResource
- func (w *AbstractWorkflow) GetWorkflows() (list_computings []graph.GraphItem)
- type ScheduleMode
- type Workflow
- func (wfa *Workflow) CheckBooking(caller *tools.HTTPCaller) (bool, error)
- func (dma *Workflow) Deserialize(j map[string]interface{}) utils.DBObject
- func (d *Workflow) GetAccessor(caller *tools.HTTPCaller) utils.Accessor
- func (d *Workflow) GetName() string
- func (dma *Workflow) Serialize() map[string]interface{}
- type WorkflowHistory
- type WorkflowSchedule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() *workflowMongoAccessor
New creates a new instance of the workflowMongoAccessor
func NewHistory ¶
func NewHistory() *workflowHistoryMongoAccessor
New creates a new instance of the workspaceMongoAccessor
Types ¶
type AbstractWorkflow ¶
type AbstractWorkflow struct { 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 }
* AbstractWorkflow is a struct that represents a workflow for resource or native workflow * Warning: there is 2 types of workflows, the resource workflow and the native workflow * native workflow is the one that you create to schedule an execution * resource workflow is the one that is created to set our native workflow in catalog
func (*AbstractWorkflow) GetComputeByRelatedProcessing ¶
func (w *AbstractWorkflow) GetComputeByRelatedProcessing(processingID string) []*compute.ComputeResource
func (*AbstractWorkflow) GetProcessings ¶
func (w *AbstractWorkflow) GetProcessings() (list_computings []graph.GraphItem)
func (*AbstractWorkflow) GetStoragesByRelatedProcessing ¶
func (w *AbstractWorkflow) GetStoragesByRelatedProcessing(processingID string) []*storage.StorageResource
func (*AbstractWorkflow) GetWorkflows ¶
func (w *AbstractWorkflow) GetWorkflows() (list_computings []graph.GraphItem)
type ScheduleMode ¶
type ScheduleMode int
WorkflowSchedule is a struct that contains the scheduling information of a workflow
const ( TASK ScheduleMode = iota SERVICE )
type Workflow ¶
type Workflow struct { utils.AbstractObject // AbstractObject contains the basic fields of an object (id, name) AbstractWorkflow // 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) Deserialize ¶
func (*Workflow) GetAccessor ¶
func (d *Workflow) GetAccessor(caller *tools.HTTPCaller) utils.Accessor
type WorkflowHistory ¶
type WorkflowHistory struct{ Workflow }
func (*WorkflowHistory) GenerateID ¶
func (r *WorkflowHistory) GenerateID()
func (*WorkflowHistory) GetAccessor ¶
func (d *WorkflowHistory) GetAccessor(caller *tools.HTTPCaller) utils.Accessor
type WorkflowSchedule ¶
type WorkflowSchedule struct { Mode int64 `json:"mode" bson:"mode" validate:"required"` // Mode is the mode of the schedule (Task or Service) Name string `json:"name" bson:"name" validate:"required"` // Name is the name of the schedule Start *time.Time `json:"start" bson:"start" validate:"required,ltfield=End"` // Start is the start time of the schedule, is required and must be less than the End time End *time.Time `json:"end,omitempty" bson:"end,omitempty"` // End is the end time of the schedule Cron string `json:"cron,omitempty" bson:"cron,omitempty"` // here the cron format : ss mm hh dd MM dw task }
* WorkflowSchedule is a struct that contains the scheduling information of a workflow * It contains the mode of the schedule (Task or Service), the name of the schedule, the start and end time of the schedule and the cron expression