From dac0f1f2738acc3ec1e7d731a4135692f529fe32 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Tue, 12 Sep 2023 19:01:35 -0600 Subject: [PATCH] Removed extra methods from ListenerExt --- listener.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/listener.go b/listener.go index 1d25075..9bbfb74 100644 --- a/listener.go +++ b/listener.go @@ -2,7 +2,6 @@ package graphvent import ( "reflect" - "encoding/json" ) // A Listener extension provides a channel that can receive signals on a different thread @@ -24,13 +23,6 @@ func NewListenerExt(buffer int) *ListenerExt { } } -// Simple load function, unmarshal the buffer int from json -func (ext *ListenerExt) DeserializeListenerExt(ctx *Context, data []byte) error { - err := json.Unmarshal(data, &ext.Buffer) - ext.Chan = make(chan Signal, ext.Buffer) - return err -} - func (listener *ListenerExt) Type() ExtType { return ListenerExtType } @@ -45,7 +37,3 @@ func (ext *ListenerExt) Process(ctx *Context, node *Node, source NodeID, signal } return nil } - -func (ext *ListenerExt) MarshalBinary() ([]byte, error) { - return json.Marshal(ext.Buffer) -}