fix: use interface not implementation

This commit is contained in:
Derrick Hammer 2024-01-07 03:19:04 -05:00
parent 713bcf98c3
commit bd8c14e53e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package protocol
import (
"fmt"
"git.lumeweb.com/LumeWeb/libs5-go/interfaces"
"git.lumeweb.com/LumeWeb/libs5-go/net"
"git.lumeweb.com/LumeWeb/libs5-go/node"
"git.lumeweb.com/LumeWeb/libs5-go/types"
@ -14,7 +15,7 @@ var (
)
type IncomingMessage interface {
HandleMessage(node *node.NodeImpl, peer *net.Peer, verifyId bool) error
HandleMessage(node *interfaces.Node, peer *net.Peer, verifyId bool) error
SetIncomingMessage(msg IncomingMessage)
msgpack.CustomDecoder
}
@ -54,7 +55,7 @@ func (i *IncomingMessageImpl) ToMessage() (message []byte, err error) {
return msgpack.Marshal(i)
}
func (i *IncomingMessageImpl) HandleMessage(node *node.NodeImpl, peer *net.Peer, verifyId bool) error {
func (i *IncomingMessageImpl) HandleMessage(node *interfaces.Node, peer *net.Peer, verifyId bool) error {
panic("child class should implement this method")
}