process

package
v0.0.0-...-455f122 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MaxContentsBytes = 64 * units.Kilobyte

Variables

View Source
var ErrFileNotFound = errors.New("file not found")

Functions

func DebugWorkflow

func DebugWorkflow(wf *cwl.Workflow, vals cwl.Values)

DebugWorkflow is a temporary placeholder for workflow processing code.

Types

type Binding

type Binding struct {

	// the bound type (resolved by matching the input value to one of many allowed types)
	// can be nil, which means no matching type could be determined.
	Type interface{}
	// the value from the input object
	Value cwl.Value
	// contains filtered or unexported fields
}

Binding binds an input type description (string, array, record, etc) to a concrete input value. this information is used while building command line args.

type Filesystem

type Filesystem interface {
	Create(path, contents string) (cwl.File, error)
	Info(loc string) (cwl.File, error)
	Contents(loc string) (string, error)
	Glob(pattern string) ([]cwl.File, error)
}

type Mebibyte

type Mebibyte int

type Process

type Process struct {
	// contains filtered or unexported fields
}

func NewProcess

func NewProcess(tool *cwl.Tool, values cwl.Values, rt Runtime, fs Filesystem) (*Process, error)

func (*Process) Command

func (process *Process) Command() ([]string, error)

func (*Process) Env

func (process *Process) Env() map[string]string

func (*Process) InputBindings

func (process *Process) InputBindings() []*Binding

func (*Process) Outputs

func (process *Process) Outputs(fs Filesystem) (cwl.Values, error)

Outputs binds cwl.Tool output descriptors to concrete values.

func (*Process) Resources

func (process *Process) Resources() Resources

func (*Process) Stderr

func (process *Process) Stderr() string

func (*Process) Stdout

func (process *Process) Stdout() string

func (*Process) Tool

func (process *Process) Tool() *cwl.Tool

type Resources

type Resources struct {
	CoresMin,
	CoresMax int

	RAMMin,
	RAMMax,
	OutdirMin,
	OutdirMax,
	TmpdirMin,
	TmpdirMax Mebibyte
}

type Runtime

type Runtime struct {
	Outdir string
	Tmpdir string
	// TODO make these all strings?
	RootHost   string
	Cores      string
	RAM        Mebibyte
	OutdirSize Mebibyte
	TmpdirSize Mebibyte
}

TODO this is provided to expressions early on in process processing,

but it won't have real values from a scheduler until much later.

Directories

Path Synopsis
env
exec
fs

Jump to

Keyboard shortcuts

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