converter

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestDump = Dump{
	Workflows: []workflowEntry{
		{
			Name:   "producer-0",
			Inputs: []io{},
			Outputs: []io{
				io{
					Binding:     "out",
					Origin:      "TST",
					Description: "RAWDATA",
					Subspec:     0,
					Lifetime:    0,
				},
			},
			Options:            []options{},
			Rank:               0,
			NSlots:             1,
			InputTimeSliceID:   0,
			MaxInputTimeslices: 1,
		},
	},
	Metadata: []metadataEntry{
		{
			Name:       "internal-dpl-clock",
			Executable: "o2-qc-run-basic",
			CmdlLineArgs: []string{
				"-b",
				"--dump-workflow",
				"--dump-workflow-file",
				"dpl-dump.json",
			},
			WorkflowOptions: []options{
				{
					Name:         "config-path",
					Type:         "4",
					DefaultValue: "",
					Help:         "Absolute path to the config file. Overwrite the default paths. Do not use with no-data-sampling.",
				},
				{
					Name:         "no-data-sampling",
					Type:         "5",
					DefaultValue: "0",
					Help:         "Skips data sampling, connects directly the task to the producer.",
				},
				{
					Name:         "readers",
					Type:         "1",
					DefaultValue: "1",
					Help:         "number of parallel readers to use",
				},
				{
					Name:         "pipeline",
					Type:         "4",
					DefaultValue: "",
					Help:         "override default pipeline size",
				},
			},
			Channels: []string{
				"from_internal-dpl-clock_to_producer-0",
				"from_internal-dpl-clock_to_Dispatcher",
				"from_internal-dpl-clock_to_QC-TASK-RUNNER-QcTask",
			},
		},
		{
			Name:       "producer-0",
			Executable: "o2-qc-run-basic",
			CmdlLineArgs: []string{
				"-b",
				"--dump-workflow",
				"--dump-workflow-file",
				"dpl-dump.json",
			},
			WorkflowOptions: []options{
				options{
					Name:         "config-path",
					Type:         "4",
					DefaultValue: "",
					Help:         "Absolute path to the config file. Overwrite the default paths. Do not use with no-data-sampling.",
				},
				options{
					Name:         "no-data-sampling",
					Type:         "5",
					DefaultValue: "0",
					Help:         "Skips data sampling, connects directly the task to the producer.",
				},
				options{
					Name:         "readers",
					Type:         "1",
					DefaultValue: "1",
					Help:         "number of parallel readers to use",
				},
				options{
					Name:         "pipeline",
					Type:         "4",
					DefaultValue: "",
					Help:         "override default pipeline size",
				},
			},
			Channels: []string{
				"from_internal-dpl-clock_to_producer-0",
				"from_producer-0_to_Dispatcher",
			},
		},
	},
}
View Source
var TestJSON = `` /* 3476-byte string literal not displayed */

Functions

func ExtractTaskClasses

func ExtractTaskClasses(dplDump Dump, taskNamePrefix string, envModules []string) (tasks []*taskclass.Class, err error)

ExtractTaskClasses takes in a DPL Dump string and extracts an array of Tasks

func GenerateTaskTemplate

func GenerateTaskTemplate(extractedTasks []*taskclass.Class, outputDir string, defaults map[string]string) (err error)

GenerateTaskTemplate takes as input an array of pointers to task.Class and writes them to a AliECS friendly YAML file

func GenerateWorkflowTemplate

func GenerateWorkflowTemplate(input workflow.Role, outputDir string) (err error)

Types

type Dump

type Dump struct {
	Workflows []workflowEntry `json:"workflow"`
	Metadata  []metadataEntry `json:"metadata"`
}

Dump is a 1:1 struct representation of a DPL Dump

func DPLImporter

func DPLImporter(input []byte) (importedJSON Dump, err error)

Jump to

Keyboard shortcuts

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