Documentation ¶
Index ¶
- type HTTPNode
- func (p *HTTPNode) GetGenesisID() string
- func (p *HTTPNode) GetHTTPPeer() network.Peer
- func (p *HTTPNode) GetPeers(options ...network.PeerOption) []network.Peer
- func (p *HTTPNode) RegisterHTTPHandler(path string, handler http.Handler)
- func (p *HTTPNode) RegisterHandlers(dispatch []network.TaggedMessageHandler)
- func (p *HTTPNode) SetGenesisID(genesisID string)
- func (p *HTTPNode) SetPeers(other *HTTPNode)
- func (p *HTTPNode) Start() error
- func (p *HTTPNode) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPNode ¶
type HTTPNode struct { mocks.MockNetwork host.Host // contains filtered or unexported fields }
HTTPNode is a mock network node that uses libp2p and http.
func MakeHTTPNode ¶
MakeHTTPNode returns a new P2PHTTPNode node.
func (*HTTPNode) GetGenesisID ¶
GetGenesisID returns genesisID
func (*HTTPNode) GetHTTPPeer ¶
GetHTTPPeer returns the http peer for connecting to this node
func (*HTTPNode) GetPeers ¶
func (p *HTTPNode) GetPeers(options ...network.PeerOption) []network.Peer
GetPeers returns peers
func (*HTTPNode) RegisterHTTPHandler ¶
RegisterHTTPHandler registers a http handler with a given path.
func (*HTTPNode) RegisterHandlers ¶
func (p *HTTPNode) RegisterHandlers(dispatch []network.TaggedMessageHandler)
RegisterHandlers not implemented.
func (*HTTPNode) SetGenesisID ¶
SetGenesisID sets genesisID
Click to show internal directories.
Click to hide internal directories.