Documentation
¶
Index ¶
- type BenchMarkDetail
- type BenchMarkRequest
- type BenchMarkResponse
- type Block
- type BlockHeightRequest
- type BlockID
- type BlockMeta
- type BlockParams
- type ChainInfo
- type ChainInfoRequest
- type ChainState
- type ChannelStatus
- type CommandRequest
- type CommitSig
- type CommittedTx
- type CommittedTxListRequest
- type CommonResponse
- type ConnectionStatus
- type ConsensusParams
- type Data
- type EvidenceParams
- type ExecuteAsyncResponse
- type ExecuteRequest
- type ExecuteResponse
- type Genesis
- type GenesisValidator
- type GinMsg
- func (g *GinMsg) CommonResponse(httpCode int, code uint32, codeMsg string)
- func (g *GinMsg) DecodeRequestBody(data interface{})
- func (g *GinMsg) Error(httpCode int, code uint32, codeMsg string, err error)
- func (g *GinMsg) Response(httpCode int, data interface{})
- func (g *GinMsg) Success()
- func (g *GinMsg) SuccessWithData(data interface{})
- type Header
- type HexBytes
- type LoginRequest
- type NetInfo
- type NodeInfo
- type OperationKeyLog
- type OperationLog
- type PartSetHeader
- type Peer
- type ProofDetail
- type QueryPrivateWithAddrRequest
- type QueryResponse
- type Status
- type SyncInfo
- type TokenResponse
- type Transaction
- type TransactionCommittedList
- type TransactionList
- type TxCommitBody
- type TxCommitData
- type TxHashRequest
- type TxProof
- type UnConfirmedTxs
- type ValidatorInfo
- type ValidatorParams
- type ValidatorUpdateBody
- type ValidatorUpdateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchMarkDetail ¶
type BenchMarkRequest ¶
type BenchMarkRequest struct {
TxNums int `json:"tx_nums"`
TxSendPerSec int `json:"tx_send_per_sec"`
Connections int `json:"connections"`
Mode string `json:"mode"`
Cmd string `json:"cmd"`
}
bench mark
type BenchMarkResponse ¶
type BenchMarkResponse struct {
Latency *BenchMarkDetail
Tps *BenchMarkDetail
}
type BlockHeightRequest ¶
type BlockHeightRequest struct {
Height int `json:"height"`
}
type BlockID ¶
type BlockID struct {
Hash string `json:"hash"`
PartsHeader PartSetHeader `json:"parts"`
}
type BlockParams ¶
type ChainInfo ¶
type ChainInfo struct {
LastHeight int64 `json:"last_height"`
BlockMetas []*BlockMeta `json:"block_metas"`
}
chain
type ChainInfoRequest ¶
type ChainState ¶
type ChainState struct {
NodeInfo NodeInfo `json:"node_info"`
SyncInfo SyncInfo `json:"sync_info"`
ValidatorInfo ValidatorInfo `json:"validator_info"`
}
type ChannelStatus ¶
type CommittedTx ¶
type CommittedTx struct {
Data *TxCommitData `json:"data"`
Signature string `json:"signature"`
Address string `json:"address"`
Height int64 `json:"height"`
}
type CommittedTxListRequest ¶
type CommonResponse ¶
type ConnectionStatus ¶
type ConnectionStatus struct {
Duration time.Duration
SendMonitor Status
RecvMonitor Status
Channels []ChannelStatus
}
type ConsensusParams ¶
type ConsensusParams struct {
Block BlockParams `json:"block"`
Evidence EvidenceParams `json:"evidence"`
Validator ValidatorParams `json:"validator"`
}
type EvidenceParams ¶
type EvidenceParams struct {
MaxAge int64 `json:"max_age"`
}
type ExecuteAsyncResponse ¶
type ExecuteRequest ¶
type ExecuteResponse ¶
type Genesis ¶
type Genesis struct {
GenesisTime time.Time `json:"genesis_time"`
ChainID string `json:"chain_id"`
ConsensusParams *ConsensusParams `json:"consensus_params,omitempty"`
Validators []GenesisValidator `json:"validators,omitempty"`
AppHash HexBytes `json:"app_hash"`
AppState json.RawMessage `json:"app_state,omitempty"`
}
type GenesisValidator ¶
type GinMsg ¶
func (*GinMsg) CommonResponse ¶
func (*GinMsg) DecodeRequestBody ¶
func (g *GinMsg) DecodeRequestBody(data interface{})
func (*GinMsg) SuccessWithData ¶
func (g *GinMsg) SuccessWithData(data interface{})
type Header ¶
type Header struct {
Version version.Consensus `json:"version"`
ChainID string `json:"chain_id"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
NumTxs int64 `json:"num_txs"`
TotalTxs int64 `json:"total_txs"`
LastBlockID BlockID `json:"last_block_id"`
LastCommitHash string `json:"last_commit_hash"`
DataHash string `json:"data_hash"`
ValidatorsHash string `json:"validators_hash"`
NextValidatorsHash string `json:"next_validators_hash"`
ConsensusHash string `json:"consensus_hash"`
AppHash string `json:"app_hash"`
LastResultsHash string `json:"last_results_hash"`
EvidenceHash string `json:"evidence_hash"`
ProposerAddress string `json:"proposer_address"`
}
type LoginRequest ¶
type NetInfo ¶
type NetInfo struct {
Listening bool `json:"listening"`
Listeners []string `json:"listeners"`
NPeers int `json:"n_peers"`
Peers []Peer `json:"peers"`
}
net info
type OperationKeyLog ¶
type OperationKeyLog struct {
Key string `json:"key"`
OperationLog []OperationLog `json:"command_log"`
}
badger
type OperationLog ¶
type PartSetHeader ¶
type Peer ¶
type Peer struct {
NodeInfo NodeInfo `json:"node_info"`
IsOutbound bool `json:"is_outbound"`
ConnectionStatus ConnectionStatus `json:"connection_status"`
RemoteIP string `json:"remote_ip"`
}
type ProofDetail ¶
type QueryResponse ¶
type QueryResponse struct {
Result string `json:"result"`
}
type Status ¶
type Status struct {
Active bool // Flag indicating an active transfer
Start time.Time // Transfer start time
Duration time.Duration // Time period covered by the statistics
Idle time.Duration // Time since the last transfer of at least 1 byte
Bytes int64 // Total number of bytes transferred
Samples int64 // Total number of samples taken
InstRate int64 // Instantaneous transfer rate
CurRate int64 // Current transfer rate (EMA of InstRate)
AvgRate int64 // Average transfer rate (Bytes / Duration)
PeakRate int64 // Maximum instantaneous transfer rate
BytesRem int64 // Number of bytes remaining in the transfer
TimeRem time.Duration // Estimated time to completion
Progress utils.Percent // Overall transfer progress
}
type TokenResponse ¶
type Transaction ¶
type Transaction struct {
Hash string `json:"hash"`
Height int64 `json:"height"`
Index uint32 `json:"index"`
Data *TxCommitBody `json:"data"`
ExecuteResult string `json:"execute_result"`
Proof *TxProof `json:"proof,omitempty"`
}
Transaction
type TransactionCommittedList ¶
type TransactionCommittedList struct {
Total int64 `json:"total"`
Data []*CommittedTx `json:"data"`
}
type TransactionList ¶
type TransactionList struct {
Height int64 `json:"height"`
Total int64 `json:"total"`
Txs []Transaction `json:"txs"`
}
type TxCommitBody ¶
type TxCommitBody struct {
Data *TxCommitData `json:"data"`
Signature string `json:"signature"`
Address string `json:"address"`
}
type TxCommitData ¶
type TxHashRequest ¶
type TxHashRequest struct {
Hash string `json:"hash"`
}
type TxProof ¶
type TxProof struct {
RootHash string `json:"root_hash"`
Proof *ProofDetail `json:"proof"`
}
type UnConfirmedTxs ¶
type UnConfirmedTxs struct {
Count int `json:"n_txs"`
Total int `json:"total"`
TotalBytes int64 `json:"total_bytes"`
Txs []TxCommitBody `json:"txs"`
}
type ValidatorInfo ¶
type ValidatorParams ¶
type ValidatorParams struct {
PubKeyTypes []string `json:"pub_key_types"`
}
type ValidatorUpdateBody ¶
type ValidatorUpdateBody struct {
ValidatorUpdate *ValidatorUpdateData `json:"validator_update"`
Signature string `json:"signature"`
Address string `json:"address"`
}
type ValidatorUpdateData ¶
Click to show internal directories.
Click to hide internal directories.