diff --git a/graph.go b/graph.go index 167288f..ede65d6 100644 --- a/graph.go +++ b/graph.go @@ -159,6 +159,7 @@ type GraphNode interface { UnregisterChannel(listener chan GraphSignal) UpdateChannel() chan GraphSignal Update(signal GraphSignal) + GetUpdate() GraphSignal } func NewBaseNode(name string, description string, id string) BaseNode { @@ -188,6 +189,10 @@ func (node * BaseNode) Update(signal GraphSignal) { node.signal <- signal } +func (node * BaseNode) GetUpdate() GraphSignal { + return <- node.signal +} + func (node * BaseNode) Name() string { return node.name }