refactor: move definition of Peer and related types
This commit is contained in:
1 parent
7a026f5a14
commit
f304543ddf
2 files changed
+22
-21
No files matched your search
@@ -25,27 +25,6 @@ type Router struct {
|
||||
LogFrame func(string, []byte, *layers.Ethernet)
|
||||
}
|
||||
|
||||
type Peer struct {
|
||||
sync.RWMutex
|
||||
Name PeerName
|
||||
NameByte []byte
|
||||
UID uint64
|
||||
version uint64
|
||||
localRefCount uint64
|
||||
connections map[PeerName]Connection
|
||||
}
|
||||
|
||||
type LocalPeer struct {
|
||||
*Peer
|
||||
Router *Router
|
||||
queryChan chan<- *PeerInteraction
|
||||
}
|
||||
|
||||
type PeerInteraction struct {
|
||||
Interaction
|
||||
payload interface{}
|
||||
}
|
||||
|
||||
type Connection interface {
|
||||
Local() *Peer
|
||||
Remote() *Peer
|
||||
|
||||
Reference in new issue
Block a user