We could move Node.setLastError and Node.LastError to channel.go in PR #140. We currently don't use Node.LastError in the gorums codebase, and all uses of setLastError stems from channel.go. This would help to decouple Node from channel, since channel refers to Node and Node refers to channel. If we ever need to access Node.LastError, we can simply get it from channel.LastError.
There are a few other references to Node used in channel.go, e.g., two manager options (backoff and send buffer), and the Node.ID(). These can be replicated in the state of the channel struct, instead of referring back to Node. What do you think @Raytar ?
We could move
Node.setLastError
andNode.LastError
tochannel.go
in PR #140. We currently don't useNode.LastError
in the gorums codebase, and all uses ofsetLastError
stems fromchannel.go
. This would help to decoupleNode
fromchannel
, sincechannel
refers toNode
andNode
refers tochannel
. If we ever need to accessNode.LastError
, we can simply get it fromchannel.LastError
.There are a few other references to
Node
used inchannel.go
, e.g., two manager options (backoff and send buffer), and the Node.ID(). These can be replicated in the state of thechannel
struct, instead of referring back toNode
. What do you think @Raytar ?