fbp

package
v0.0.0-...-c98f1fc Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2018 License: Unlicense Imports: 8 Imported by: 0

README

Proof of Concept Flow Based Programming library

Documentation

Index

Constants

View Source
const BufferSize = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

type Graph struct {
	// Comm is used for input/output from the Graph
	Comm interface{}
	// Registry contains all the constructors for nodes
	Registry Registry
	// Nodes contains created node information
	Nodes map[Name]Node
	// Ports contains all tha ports
	Ports map[string]*Port
}

func New

func New(comm interface{}) *Graph

func (*Graph) Setup

func (g *Graph) Setup(def string) error

Setup is convenience for parsing the wiring and wiring up the graph

func (*Graph) Start

func (g *Graph) Start()

starts all the nodes

func (*Graph) WireUp

func (g *Graph) WireUp(w *Wiring) error

type MakeFn

type MakeFn func() Node

type Name

type Name string

type Node

type Node interface{}

type Port

type Port struct {
	Name string
	Chan reflect.Value
	Refs int32
}

func NewPort

func NewPort(name string, v reflect.Value) *Port

func (*Port) Acquire

func (c *Port) Acquire()

func (*Port) Release

func (c *Port) Release()

type PortName

type PortName string

type Registry

type Registry map[Type]MakeFn

type Runnable

type Runnable interface {
	Run() error
}

type Type

type Type string

type Wire

type Wire struct {
	From Name
	Src  PortName
	To   Name
	Dst  PortName
}

type Wiring

type Wiring struct {
	Decls map[Name]Type
	Wires []Wire
}

func ParseWiring

func ParseWiring(def string) (*Wiring, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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