loader

package
v0.0.0-...-30bd09b Latest Latest
Warning

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

Go to latest
Published: May 1, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Imports    map[string]string
	Entry      parser.ID
	Components []Component
	Flow       graph
}

App represents a flow program which has been loaded and type checked.

func Load

func Load(prog parser.Program) (App, []error)

Load loads the components of a flow app and reports type errors found in the graph.

Example
prog, _ := parser.ParseReader(strings.NewReader(`
entry: start
components:
  start: func(s string) {}
`))
app, _ := Load(prog)
fmt.Println(app.Components[0].Inputs)
Output:

(s string)

func (App) Component

func (a App) Component(label parser.ID) Component

Component returns the component within the App with the given ID

type Component

type Component struct {
	Label   parser.ID
	Func    string
	Inputs  *types.Tuple
	Outputs *types.Tuple
}

Component is a single process node within a flow program

Jump to

Keyboard shortcuts

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