runtime

package
v0.0.0-...-e07d34e Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxWorkers = runtime.GOMAXPROCS(0)

MaxWorkers defines the maximum Node-level concurrency in the StageRunner.

Functions

This section is empty.

Types

type NodeFactory

type NodeFactory interface {
	New(nuggit.Node) (any, error)
}

type Runner

type Runner interface {
	Run(ctx context.Context) (any, error)
}

type StageCoordinator

type StageCoordinator struct {
	context.Context
}

type StageRunner

type StageRunner struct {
	NodeFactory NodeFactory
	Overrides   []map[string]any
	Coord       *StageCoordinator
	Graphs      []*graphs.Graph
	Results     []map[nuggit.NodeKey]json.RawMessage
	// contains filtered or unexported fields
}

StageRunner executes all the graphs in the current stage concurrently. Multiple graphs in a given stage are executed in parallel while Node-level paralelism is limited by MaxWorkers.

The StageCoordinator is used when the runner must exchange data outside the stage.

The zero StageRunner is ready to use.

TODO(wes): Implement the coordinator.

func (*StageRunner) Run

func (r *StageRunner) Run(ctx context.Context) error

type Validator

type Validator interface {
	Validate() error
}

type VarBinder

type VarBinder interface {
	Bind(data json.RawMessage, val any) (json.RawMessage, error)
}

Jump to

Keyboard shortcuts

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