Documentation ¶
Index ¶
- Constants
- Variables
- func ABCIInfo() (*ctypes.ResultABCIInfo, error)
- func ABCIInfoResult() (ctypes.TMResult, error)
- func ABCIQuery(query []byte) (*ctypes.ResultABCIQuery, error)
- func ABCIQueryResult(query []byte) (ctypes.TMResult, error)
- func Block(height int) (*ctypes.ResultBlock, error)
- func BlockResult(height int) (ctypes.TMResult, error)
- func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)
- func BlockchainInfoResult(min, max int) (ctypes.TMResult, error)
- func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func BroadcastTxAsyncResult(tx []byte) (ctypes.TMResult, error)
- func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func BroadcastTxCommitResult(tx []byte) (ctypes.TMResult, error)
- func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func BroadcastTxSyncResult(tx []byte) (ctypes.TMResult, error)
- func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)
- func DumpConsensusStateResult() (ctypes.TMResult, error)
- func Genesis() (*ctypes.ResultGenesis, error)
- func GenesisResult() (ctypes.TMResult, error)
- func NetInfo() (*ctypes.ResultNetInfo, error)
- func NetInfoResult() (ctypes.TMResult, error)
- func NumUnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
- func NumUnconfirmedTxsResult() (ctypes.TMResult, error)
- func SetBlockStore(bs BlockStore)
- func SetConfig(c cfg.Config)
- func SetConsensusState(cs Consensus)
- func SetEventSwitch(evsw types.EventSwitch)
- func SetGenesisDoc(doc *types.GenesisDoc)
- func SetMempool(mem Mempool)
- func SetProxyAppQuery(appConn proxy.AppConnQuery)
- func SetPubKey(pk crypto.PubKey)
- func SetSwitch(sw P2P)
- func Status() (*ctypes.ResultStatus, error)
- func StatusResult() (ctypes.TMResult, error)
- func Subscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultSubscribe, error)
- func SubscribeResult(wsCtx rpctypes.WSRPCContext, event string) (ctypes.TMResult, error)
- func UnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
- func UnconfirmedTxsResult() (ctypes.TMResult, error)
- func UnsafeDialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error)
- func UnsafeDialSeedsResult(seeds []string) (ctypes.TMResult, error)
- func UnsafeFlushMempool() (*ctypes.ResultUnsafeFlushMempool, error)
- func UnsafeFlushMempoolResult() (ctypes.TMResult, error)
- func UnsafeSetConfig(typ, key, value string) (*ctypes.ResultUnsafeSetConfig, error)
- func UnsafeSetConfigResult(typ, key, value string) (ctypes.TMResult, error)
- func UnsafeStartCPUProfiler(filename string) (*ctypes.ResultUnsafeProfile, error)
- func UnsafeStartCPUProfilerResult(filename string) (ctypes.TMResult, error)
- func UnsafeStopCPUProfiler() (*ctypes.ResultUnsafeProfile, error)
- func UnsafeStopCPUProfilerResult() (ctypes.TMResult, error)
- func UnsafeWriteHeapProfile(filename string) (*ctypes.ResultUnsafeProfile, error)
- func UnsafeWriteHeapProfileResult(filename string) (ctypes.TMResult, error)
- func Unsubscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultUnsubscribe, error)
- func UnsubscribeResult(wsCtx rpctypes.WSRPCContext, event string) (ctypes.TMResult, error)
- func Validators() (*ctypes.ResultValidators, error)
- func ValidatorsResult() (ctypes.TMResult, error)
- type BlockStore
- type Consensus
- type Mempool
- type P2P
Constants ¶
View Source
const Version = "3" // rpc routes for profiling, setting config
Variables ¶
View Source
var Routes = map[string]*rpc.RPCFunc{ "subscribe": rpc.NewWSRPCFunc(SubscribeResult, "event"), "unsubscribe": rpc.NewWSRPCFunc(UnsubscribeResult, "event"), "status": rpc.NewRPCFunc(StatusResult, ""), "net_info": rpc.NewRPCFunc(NetInfoResult, ""), "blockchain": rpc.NewRPCFunc(BlockchainInfoResult, "minHeight,maxHeight"), "genesis": rpc.NewRPCFunc(GenesisResult, ""), "block": rpc.NewRPCFunc(BlockResult, "height"), "validators": rpc.NewRPCFunc(ValidatorsResult, ""), "dump_consensus_state": rpc.NewRPCFunc(DumpConsensusStateResult, ""), "unconfirmed_txs": rpc.NewRPCFunc(UnconfirmedTxsResult, ""), "num_unconfirmed_txs": rpc.NewRPCFunc(NumUnconfirmedTxsResult, ""), "broadcast_tx_commit": rpc.NewRPCFunc(BroadcastTxCommitResult, "tx"), "broadcast_tx_sync": rpc.NewRPCFunc(BroadcastTxSyncResult, "tx"), "broadcast_tx_async": rpc.NewRPCFunc(BroadcastTxAsyncResult, "tx"), "abci_query": rpc.NewRPCFunc(ABCIQueryResult, "query"), "abci_info": rpc.NewRPCFunc(ABCIInfoResult, ""), "dial_seeds": rpc.NewRPCFunc(UnsafeDialSeedsResult, "seeds"), "unsafe_flush_mempool": rpc.NewRPCFunc(UnsafeFlushMempool, ""), "unsafe_set_config": rpc.NewRPCFunc(UnsafeSetConfigResult, "type,key,value"), "unsafe_start_cpu_profiler": rpc.NewRPCFunc(UnsafeStartCPUProfilerResult, "filename"), "unsafe_stop_cpu_profiler": rpc.NewRPCFunc(UnsafeStopCPUProfilerResult, ""), "unsafe_write_heap_profile": rpc.NewRPCFunc(UnsafeWriteHeapProfileResult, "filename"), }
TODO: better system than "unsafe" prefix
Functions ¶
func ABCIInfo ¶ added in v0.8.0
func ABCIInfo() (*ctypes.ResultABCIInfo, error)
func ABCIInfoResult ¶ added in v0.8.0
func BlockchainInfo ¶
func BlockchainInfo(minHeight, maxHeight int) (*ctypes.ResultBlockchainInfo, error)
TODO: limit/permission on (max - min)
func BroadcastTxAsync ¶
func BroadcastTxAsync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
Returns right away, with no response
func BroadcastTxCommit ¶
func BroadcastTxCommit(tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
CONTRACT: only returns error if mempool.BroadcastTx errs (ie. problem with the app) or if we timeout waiting for tx to commit. If CheckTx or DeliverTx fail, no error will be returned, but the returned result will contain a non-OK ABCI code.
func BroadcastTxSync ¶
func BroadcastTxSync(tx types.Tx) (*ctypes.ResultBroadcastTx, error)
Returns with the response from CheckTx
func DumpConsensusState ¶
func DumpConsensusState() (*ctypes.ResultDumpConsensusState, error)
func Genesis ¶
func Genesis() (*ctypes.ResultGenesis, error)
func GenesisResult ¶
func NetInfo ¶
func NetInfo() (*ctypes.ResultNetInfo, error)
func NetInfoResult ¶
func NumUnconfirmedTxs ¶
func NumUnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
func NumUnconfirmedTxsResult ¶
func SetBlockStore ¶
func SetBlockStore(bs BlockStore)
func SetConsensusState ¶
func SetConsensusState(cs Consensus)
func SetEventSwitch ¶
func SetEventSwitch(evsw types.EventSwitch)
func SetGenesisDoc ¶
func SetGenesisDoc(doc *types.GenesisDoc)
func SetMempool ¶ added in v0.7.3
func SetMempool(mem Mempool)
func SetProxyAppQuery ¶ added in v0.7.1
func SetProxyAppQuery(appConn proxy.AppConnQuery)
func Status ¶
func Status() (*ctypes.ResultStatus, error)
func StatusResult ¶
func Subscribe ¶
func Subscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultSubscribe, error)
func SubscribeResult ¶
func UnconfirmedTxs ¶
func UnconfirmedTxs() (*ctypes.ResultUnconfirmedTxs, error)
func UnconfirmedTxsResult ¶
func UnsafeDialSeeds ¶ added in v0.7.4
func UnsafeDialSeeds(seeds []string) (*ctypes.ResultDialSeeds, error)
Dial given list of seeds
func UnsafeDialSeedsResult ¶ added in v0.7.4
func UnsafeFlushMempool ¶
func UnsafeFlushMempool() (*ctypes.ResultUnsafeFlushMempool, error)
func UnsafeSetConfig ¶
func UnsafeSetConfig(typ, key, value string) (*ctypes.ResultUnsafeSetConfig, error)
func UnsafeSetConfigResult ¶
func UnsafeStartCPUProfiler ¶
func UnsafeStartCPUProfiler(filename string) (*ctypes.ResultUnsafeProfile, error)
func UnsafeStopCPUProfiler ¶
func UnsafeStopCPUProfiler() (*ctypes.ResultUnsafeProfile, error)
func UnsafeWriteHeapProfile ¶
func UnsafeWriteHeapProfile(filename string) (*ctypes.ResultUnsafeProfile, error)
func Unsubscribe ¶
func Unsubscribe(wsCtx rpctypes.WSRPCContext, event string) (*ctypes.ResultUnsubscribe, error)
func UnsubscribeResult ¶
func Validators ¶
func Validators() (*ctypes.ResultValidators, error)
func ValidatorsResult ¶
Types ¶
type BlockStore ¶ added in v0.7.3
type Consensus ¶ added in v0.7.3
type Consensus interface { GetValidators() (int, []*types.Validator) GetRoundState() *consensus.RoundState }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.