Documentation
¶
Index ¶
- func BatchSubmitTx(cls *cluster.Cluster, retryOrder []int, txs *core.TxList) (int, error)
- func GetBlockByHeight(node cluster.Node, height uint64) (*core.Block, error)
- func GetBlockByHeightAll(cls *cluster.Cluster, height uint64) map[int]*core.Block
- func GetStatus(node cluster.Node) (*consensus.Status, error)
- func GetStatusAll(cls *cluster.Cluster) map[int]*consensus.Status
- func GetTxPoolStatus(node cluster.Node) (*txpool.Status, error)
- func GetTxPoolStatusAll(cls *cluster.Cluster) map[int]*txpool.Status
- func GetTxStatus(node cluster.Node, hash []byte) (txpool.TxStatus, error)
- func PickUniqueRandoms(total, count int) []int
- func QueryState(node cluster.Node, query *common.QueryData) ([]byte, error)
- func Sleep(d time.Duration)
- func SubmitTx(cls *cluster.Cluster, retryOrder []int, tx *core.Transaction) (int, error)
- func SubmitTxAndWait(cls *cluster.Cluster, tx *core.Transaction) (int, error)
- func WaitTxCommitted(node cluster.Node, tx *core.Transaction) error
- type EVMClient
- func (client *EVMClient) BatchSubmitTx(num int) (int, *core.TxList, error)
- func (client *EVMClient) MakeDeploymentTx() *core.Transaction
- func (client *EVMClient) MakeInvokeTx() *core.Transaction
- func (client *EVMClient) SetupOnCluster(cls *cluster.Cluster) error
- func (client *EVMClient) SubmitTx() (int, *core.Transaction, error)
- func (client *EVMClient) SubmitTxAndWait() (int, error)
- type EmptyClient
- func (client *EmptyClient) BatchSubmitTx(num int) (int, *core.TxList, error)
- func (client *EmptyClient) MakeDeploymentTx() *core.Transaction
- func (client *EmptyClient) MakeTx() *core.Transaction
- func (client *EmptyClient) SetupOnCluster(cls *cluster.Cluster) error
- func (client *EmptyClient) SubmitTx() (int, *core.Transaction, error)
- func (client *EmptyClient) SubmitTxAndWait() (int, error)
- type LoadClient
- type LoadGenerator
- func (lg *LoadGenerator) BatchRun(ctx context.Context)
- func (lg *LoadGenerator) GetClient() LoadClient
- func (lg *LoadGenerator) Pause()
- func (lg *LoadGenerator) ResetTotalSubmitted() int
- func (lg *LoadGenerator) Run(ctx context.Context)
- func (lg *LoadGenerator) SetupOnCluster(cls *cluster.Cluster) error
- func (lg *LoadGenerator) UnPause()
- type PCoinClient
- func (client *PCoinClient) BatchSubmitTx(num int) (int, *core.TxList, error)
- func (client *PCoinClient) MakeBalanceQuery(dest *core.PublicKey) *common.QueryData
- func (client *PCoinClient) MakeDeploymentTx(minter *core.PrivateKey) *core.Transaction
- func (client *PCoinClient) MakeMintTx(dest *core.PublicKey, value uint64) *core.Transaction
- func (client *PCoinClient) MakeTransferTx(sender *core.PrivateKey, dest *core.PublicKey, value uint64) *core.Transaction
- func (client *PCoinClient) Mint(dest *core.PublicKey, value uint64) error
- func (client *PCoinClient) QueryBalance(node cluster.Node, dest *core.PublicKey) (uint64, error)
- func (client *PCoinClient) SetupOnCluster(cls *cluster.Cluster) error
- func (client *PCoinClient) SubmitTx() (int, *core.Transaction, error)
- func (client *PCoinClient) SubmitTxAndWait() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchSubmitTx ¶
func GetBlockByHeight ¶
func GetBlockByHeightAll ¶
func PickUniqueRandoms ¶
func SubmitTxAndWait ¶
func WaitTxCommitted ¶
func WaitTxCommitted(node cluster.Node, tx *core.Transaction) error
Types ¶
type EVMClient ¶
type EVMClient struct {
// contains filtered or unexported fields
}
func NewEVMClient ¶
func (*EVMClient) BatchSubmitTx ¶
func (*EVMClient) MakeDeploymentTx ¶
func (client *EVMClient) MakeDeploymentTx() *core.Transaction
func (*EVMClient) MakeInvokeTx ¶
func (client *EVMClient) MakeInvokeTx() *core.Transaction
func (*EVMClient) SetupOnCluster ¶
func (*EVMClient) SubmitTxAndWait ¶
type EmptyClient ¶
type EmptyClient struct {
// contains filtered or unexported fields
}
func NewEmptyClient ¶
func NewEmptyClient(nodes []int) *EmptyClient
func (*EmptyClient) BatchSubmitTx ¶
func (*EmptyClient) MakeDeploymentTx ¶
func (client *EmptyClient) MakeDeploymentTx() *core.Transaction
func (*EmptyClient) MakeTx ¶
func (client *EmptyClient) MakeTx() *core.Transaction
func (*EmptyClient) SetupOnCluster ¶
func (client *EmptyClient) SetupOnCluster(cls *cluster.Cluster) error
func (*EmptyClient) SubmitTx ¶
func (client *EmptyClient) SubmitTx() (int, *core.Transaction, error)
func (*EmptyClient) SubmitTxAndWait ¶
func (client *EmptyClient) SubmitTxAndWait() (int, error)
type LoadClient ¶
type LoadGenerator ¶
type LoadGenerator struct {
// contains filtered or unexported fields
}
var LoadGen *LoadGenerator
func NewLoadGenerator ¶
func NewLoadGenerator(client LoadClient, tps int, jobs int) *LoadGenerator
func (*LoadGenerator) BatchRun ¶
func (lg *LoadGenerator) BatchRun(ctx context.Context)
func (*LoadGenerator) GetClient ¶
func (lg *LoadGenerator) GetClient() LoadClient
func (*LoadGenerator) Pause ¶
func (lg *LoadGenerator) Pause()
func (*LoadGenerator) ResetTotalSubmitted ¶
func (lg *LoadGenerator) ResetTotalSubmitted() int
func (*LoadGenerator) Run ¶
func (lg *LoadGenerator) Run(ctx context.Context)
func (*LoadGenerator) SetupOnCluster ¶
func (lg *LoadGenerator) SetupOnCluster(cls *cluster.Cluster) error
func (*LoadGenerator) UnPause ¶
func (lg *LoadGenerator) UnPause()
type PCoinClient ¶
type PCoinClient struct {
// contains filtered or unexported fields
}
func NewPCoinClient ¶
func NewPCoinClient(nodes []int, mintCount, destCount int, binccPath string) *PCoinClient
NewPCoinClient creates and setups a load service, submits chaincode deploy tx and waits for commission
func (*PCoinClient) BatchSubmitTx ¶
func (*PCoinClient) MakeBalanceQuery ¶
func (client *PCoinClient) MakeBalanceQuery(dest *core.PublicKey) *common.QueryData
func (*PCoinClient) MakeDeploymentTx ¶
func (client *PCoinClient) MakeDeploymentTx(minter *core.PrivateKey) *core.Transaction
func (*PCoinClient) MakeMintTx ¶
func (client *PCoinClient) MakeMintTx(dest *core.PublicKey, value uint64) *core.Transaction
func (*PCoinClient) MakeTransferTx ¶
func (client *PCoinClient) MakeTransferTx(sender *core.PrivateKey, dest *core.PublicKey, value uint64) *core.Transaction
func (*PCoinClient) Mint ¶
func (client *PCoinClient) Mint(dest *core.PublicKey, value uint64) error
func (*PCoinClient) QueryBalance ¶
func (*PCoinClient) SetupOnCluster ¶
func (client *PCoinClient) SetupOnCluster(cls *cluster.Cluster) error
func (*PCoinClient) SubmitTx ¶
func (client *PCoinClient) SubmitTx() (int, *core.Transaction, error)
func (*PCoinClient) SubmitTxAndWait ¶
func (client *PCoinClient) SubmitTxAndWait() (int, error)
Click to show internal directories.
Click to hide internal directories.