node

package
v0.0.0-...-75aef46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2019 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network interface {
	PeersStats() []*comm.PeerStats
}

type Node

type Node struct {
	// contains filtered or unexported fields
}

func New

func New(nw Network) *Node

func (*Node) Mount

func (n *Node) Mount(root *mux.Router, pathPrefix string)

func (*Node) PeersStats

func (n *Node) PeersStats() []*PeerStats

type PeerStats

type PeerStats struct {
	Name        string            `json:"name"`
	BestBlockID powerplay.Bytes32 `json:"bestBlockID"`
	TotalScore  uint64            `json:"totalScore"`
	PeerID      string            `json:"peerID"`
	NetAddr     string            `json:"netAddr"`
	Inbound     bool              `json:"inbound"`
	Duration    uint64            `json:"duration"`
}

func ConvertPeersStats

func ConvertPeersStats(ss []*comm.PeerStats) []*PeerStats

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL