From d8318a0a85e20f4ecd7adfa7ff785a17b9813183 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 18 Jun 2023 19:16:11 -0600 Subject: [PATCH] Added GetUpdate method to GraphNode --- graph.go | 5 +++++ 1 file changed, 5 insertions(+) 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 }