utils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

CheckError A Simple function to verify error

func NewChannels

func NewChannels() qtypes.Channels

NewChannels create an instance of Channels

Types

type QGraph added in v0.2.0

type QGraph struct {
	Inputs  map[string]graph.Node
	Filters map[string]graph.Node
	Outputs map[string]graph.Node
	Graph   *graph.Graph
}

QGraph provides a DAG to keep the relations between input,filters and output

func NewQGraph added in v0.2.0

func NewQGraph() QGraph

NewQGraph returns a initial graph

func (*QGraph) AddFilter added in v0.6.0

func (qg *QGraph) AddFilter(f string, parents []string)

AddFilter adds a filter to the graph, which either listens to - a input directly if the name is found in the inputs list - a filter of some sort. if parents are empty it will be added without a parent

func (*QGraph) AddInput added in v0.6.0

func (qg *QGraph) AddInput(in string)

AddInput adds a input node to the graph

func (*QGraph) AddOutput added in v0.2.0

func (qg *QGraph) AddOutput(out string, parents []string)

AddOutput adds a handler to the graph, which either listens to - a input directly if the name is found in the inputs list - a filter of some sort. if parents are empty it will be added without a parent

func (*QGraph) ConnectFilters added in v0.6.0

func (qg *QGraph) ConnectFilters()

ConnectFilters looks for filters w/o inputs and will connect them to all inputs

func (*QGraph) ConnectOutputs added in v0.6.0

func (qg *QGraph) ConnectOutputs()

ConnectOutputs looks for outputs w/o inputs (inputs/filters) and will connect them to all leafs of the inputs/filter graph.

func (*QGraph) PrintGraph added in v0.6.0

func (qg *QGraph) PrintGraph()

PrintGraph outputs the graph to stdout

Jump to

Keyboard shortcuts

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