ceremonyclient/node/p2p/pubsub.go

17 lines
438 B
Go
Raw Normal View History

2023-09-03 23:47:09 +00:00
package p2p
import (
"source.quilibrium.com/quilibrium/monorepo/go-libp2p-blossomsub/pb"
)
type PubSub interface {
PublishToBitmask(bitmask []byte, data []byte) error
Publish(data []byte) error
Subscribe(bitmask []byte, handler func(message *pb.Message) error, raw bool)
Unsubscribe(bitmask []byte, raw bool)
GetPeerID() []byte
2023-09-10 23:29:17 +00:00
GetPeerstoreCount() int
GetNetworkPeersCount() int
2023-09-03 23:47:09 +00:00
GetRandomPeer(bitmask []byte) ([]byte, error)
}