Documentation ¶
Index ¶
- Constants
- type Node
- func (n *Node) Addresses() []string
- func (n *Node) Broadcast(data []byte) error
- func (n *Node) Connect(address string) error
- func (n *Node) DumpAddresses()
- func (n *Node) GetMessages() chan *pubsub.Message
- func (n *Node) GetPeers() []peer.ID
- func (n *Node) ID() peer.ID
- func (n *Node) ListPeers() []peer.ID
- func (n *Node) NewStream(p peer.ID, pids protocol.ID) (network.Stream, error)
- func (n *Node) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)
- func (n *Node) Start(parentCtx context.Context, opts ...pubsub.Option) error
- func (n *Node) Stop()
- type NodeOpt
Constants ¶
View Source
const NodeMessagesQueueSize = 128
NodeMessagesQueueSize is the number of incoming messages to buffer for each topic.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) DumpAddresses ¶
func (n *Node) DumpAddresses()
func (*Node) GetMessages ¶
func (*Node) SetStreamHandler ¶
func (n *Node) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)
Click to show internal directories.
Click to hide internal directories.