network

package
v0.0.0-...-519a79d Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodeNotFound     = errors.New("node doesn't exist")
	ErrUnknownNodeType  = errors.New("node type not recognized")
	ErrReservedNodeName = errors.New("node name is reserved")
)

Functions

This section is empty.

Types

type Network

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

func New

func New() *Network

func (*Network) AddNode

func (n *Network) AddNode(name string, node tributary.Node) error

func (*Network) Edges

func (n *Network) Edges() map[string][]string

func (*Network) Fanin

func (n *Network) Fanin(b string, an ...string) error

func (*Network) Fanout

func (n *Network) Fanout(a string, bn ...string) error

Fanout links the source to all outputs

func (*Network) GetNode

func (n *Network) GetNode(a string) (tributary.Node, bool)

func (*Network) IsConnected

func (n *Network) IsConnected() bool
func (n *Network) Link(a, b string) error

func (*Network) NodeExists

func (n *Network) NodeExists(a string) bool

func (*Network) NodeUnconnected

func (n *Network) NodeUnconnected(a string) bool

func (*Network) Start

func (n *Network) Start()

func (*Network) Stop

func (n *Network) Stop()

Jump to

Keyboard shortcuts

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