Documentation ¶
Index ¶
- func ProtocolAndAddress(listenAddr string) (string, string)
- func RedirectHandler(next http.Handler) http.Handler
- func SetEventSwitch(evsw types.EventSwitch, eventables ...types.Eventable)
- type Node
- func (n *Node) AddListener(l p2p.Listener)
- func (n *Node) ConfigureRPC()
- func (n *Node) DialSeeds(seeds []string) error
- func (n *Node) EventSwitch() types.EventSwitch
- func (n *Node) NodeInfo() *p2p.NodeInfo
- func (n *Node) OnStart() error
- func (n *Node) OnStop()
- func (n *Node) RunForever()
- func (n *Node) Switch() *p2p.Switch
- type NodeGreeting
- type NodeID
- type PrivNodeID
- type SignedNodeGreeting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtocolAndAddress ¶
Defaults to tcp
func SetEventSwitch ¶
func SetEventSwitch(evsw types.EventSwitch, eventables ...types.Eventable)
Add the event switch to reactors, mempool, etc.
Types ¶
type Node ¶
type Node struct { cmn.BaseService // contains filtered or unexported fields }
func (*Node) AddListener ¶
Add a Listener to accept inbound peer connections. Add listeners before starting the Node. The first listener is the primary listener (in NodeInfo)
func (*Node) ConfigureRPC ¶
func (n *Node) ConfigureRPC()
ConfigureRPC sets all variables in rpccore so they will serve rpc calls from this node
func (*Node) EventSwitch ¶
func (n *Node) EventSwitch() types.EventSwitch
func (*Node) RunForever ¶
func (n *Node) RunForever()
type NodeGreeting ¶
type PrivNodeID ¶
type PrivNodeID struct { NodeID PrivKey crypto.PrivKey }
func (*PrivNodeID) SignGreeting ¶
func (pnid *PrivNodeID) SignGreeting() *SignedNodeGreeting
type SignedNodeGreeting ¶
type SignedNodeGreeting struct { NodeGreeting Signature crypto.Signature }
Click to show internal directories.
Click to hide internal directories.