From 3e983cfecef25017367d0f9c8853499ccf65e64f Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 18 Jun 2023 19:18:11 -0600 Subject: [PATCH] Changed to SignalChannel --- graph.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/graph.go b/graph.go index ede65d6..17908c1 100644 --- a/graph.go +++ b/graph.go @@ -158,8 +158,7 @@ type GraphNode interface { RegisterChannel(listener chan GraphSignal) UnregisterChannel(listener chan GraphSignal) UpdateChannel() chan GraphSignal - Update(signal GraphSignal) - GetUpdate() GraphSignal + SignalChannel() chan GraphSignal } func NewBaseNode(name string, description string, id string) BaseNode { @@ -185,12 +184,8 @@ type BaseNode struct { listeners map[chan GraphSignal]chan GraphSignal } -func (node * BaseNode) Update(signal GraphSignal) { - node.signal <- signal -} - -func (node * BaseNode) GetUpdate() GraphSignal { - return <- node.signal +func (node * BaseNode) SignalChannel() chan GraphSignal { + return node.signal } func (node * BaseNode) Name() string {