Documentation ¶
Index ¶
- Variables
- type NR
- func (n *NR) GetNRByAddress(addr *core.Address) (core.Data, error)
- func (n *NR) GetNRHandle(start, end, version uint64) (string, error)
- func (n *NR) GetNRListByHandle(handle []byte) (core.Data, error)
- func (n *NR) GetNRListByHeight(height uint64) (nr core.Data, err error)
- func (n *NR) GetNRSummary(height uint64) (core.Data, error)
- type NRData
- type NRItem
- type NRSummary
- type NRSummaryData
- type Neblet
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidStartHeight = errors.New("invalid nr start height") ErrInvalidEndHeight = errors.New("invalid nr end height") ErrInvalidHeightInterval = errors.New("invalid nr height interval") ErrNRNotFound = errors.New("nr not found") ErrNRSummaryNotFound = errors.New("nr summary not found") )
Error types
Functions ¶
This section is empty.
Types ¶
type NR ¶
type NR struct {
// contains filtered or unexported fields
}
func (*NR) GetNRByAddress ¶
GetNRHandler returns the nr query handler
func (*NR) GetNRHandle ¶
GetNRHandler returns the nr query handler
func (*NR) GetNRListByHandle ¶
GetNRList returns the nr list
func (*NR) GetNRListByHeight ¶
GetNRListByHeight return nr list, which subtract the deplay height, ensure all node is equal.
type NRData ¶
type NRData struct { StartHeight uint64 `json:"start_height,string"` EndHeight uint64 `json:"end_height,string"` Version uint64 `json:"version,string"` Nrs []*NRItem `json:"nrs"` Err string `json:"err"` }
NRData nr data
type NRItem ¶
type NRItem struct { Address string `json:"address"` Median string `json:"median"` Weight string `json:"weight"` Score string `json:"score"` }
NRItem nr item
type NRSummary ¶
type NRSummary struct { StartHeight uint64 `json:"start_height,string"` EndHeight uint64 `json:"end_height,string"` Version uint64 `json:"version,string"` Sum *NRSummaryData `json:"sum"` Err string `json:"err"` }
type NRSummaryData ¶
func (*NRSummaryData) ToBytes ¶
func (n *NRSummaryData) ToBytes() ([]byte, error)
ToBytes serialize data
Click to show internal directories.
Click to hide internal directories.