2023-01-06 18:37:57 -04:00
|
|
|
package node
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
2023-04-16 20:04:12 -04:00
|
|
|
"github.com/libp2p/go-libp2p/core/host"
|
2023-01-13 19:58:22 -04:00
|
|
|
"github.com/libp2p/go-libp2p/core/peer"
|
2023-01-06 18:37:57 -04:00
|
|
|
"github.com/waku-org/go-waku/waku/v2/protocol"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Service interface {
|
2023-04-16 20:04:12 -04:00
|
|
|
SetHost(h host.Host)
|
2023-01-06 18:37:57 -04:00
|
|
|
Start(ctx context.Context) error
|
|
|
|
|
Stop()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ReceptorService interface {
|
|
|
|
|
Service
|
|
|
|
|
MessageChannel() chan *protocol.Envelope
|
|
|
|
|
}
|
2023-01-13 19:58:22 -04:00
|
|
|
|
|
|
|
|
type PeerConnectorService interface {
|
|
|
|
|
Service
|
|
|
|
|
PeerChannel() chan<- peer.AddrInfo
|
|
|
|
|
}
|