node

package
v0.0.0-...-ffb6f1e Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetListRes

type GetListRes struct {
	List []*GetRes `json:"list"`
}

GetListRes data

type GetRes

type GetRes struct {
	Address      string               `json:"address"`
	Name         string               `json:"name"`
	BalanceGOLD  *amount.Amount       `json:"balance_gold"`
	BalanceMNT   *amount.Amount       `json:"balance_mnt"`
	GainedGOLD   *amount.Amount       `json:"gained_gold"`
	GainedMNT    *amount.Amount       `json:"gained_mnt"`
	SystemInfo   *GetResSystemInfo    `json:"system_info"`
	Availability int                  `json:"availability"`
	QuitAt       *uint64              `json:"quit_at"`
	LaunchedAt   uint64               `json:"created_at"`
	History      []*GetResHistoryItem `json:"history"`
}

GetRes data

type GetResHistoryItem

type GetResHistoryItem struct {
	Time uint64  `json:"time"`
	Gold float64 `json:"gold"`
	Mnt  float64 `json:"mnt"`
}

GetResHistoryItem data

type GetResSystemInfo

type GetResSystemInfo struct {
	Version  string                   `json:"version"`
	Blocks   uint64                   `json:"blocks"`
	TxPool   string                   `json:"tx_pool"`
	Problems GetResSystemInfoProblems `json:"problems"`
}

GetResSystemInfo data

type GetResSystemInfoProblems

type GetResSystemInfoProblems struct {
	Desync  bool `json:"desync"`
	Wallet  bool `json:"wallet"`
	Version bool `json:"version"`
}

GetResSystemInfoProblems data

type GetStatsRes

type GetStatsRes struct {
	Nodes       uint32         `json:"nodes"`
	BalanceGOLD *amount.Amount `json:"balance_gold"`
	BalanceMNT  *amount.Amount `json:"balance_mnt"`
	GainedGOLD  *amount.Amount `json:"gained_gold"`
	GainedMNT   *amount.Amount `json:"gained_mnt"`
}

GetStatsRes data

type Service

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

Service is a node service

func New

func New(reader dao.IDAO, latency mtx.Histogram) *Service

New instance

func (*Service) GetStats

func (s *Service) GetStats(w http.ResponseWriter, r *http.Request)

GetStats ...

func (*Service) List

func (s *Service) List(w http.ResponseWriter, r *http.Request)

List ...

Jump to

Keyboard shortcuts

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