Documentation ¶
Index ¶
- Constants
- type EndorserConfig
- type OrdererConfig
- type TxManager
- func (tm *TxManager) GetCreator() []byte
- func (tm *TxManager) GetSigner() interface{}
- func (tm *TxManager) GetTransactionByID(chainId, txid string) (string, error)
- func (tm *TxManager) PickEndorserConfig() (*EndorserConfig, error)
- func (tm *TxManager) PickOrdererConfig() (*OrdererConfig, error)
- func (tm *TxManager) PickRandomTxHandler() (*endorser.TransactionHandler, error)
- func (tm *TxManager) RandomTxHandler() (*endorser.TransactionHandler, error)
- func (tm *TxManager) RetraceEvent(log chan event.ChaincodeEventInfo, config event.RetraceConf)
- func (tm *TxManager) RollBack(userToC endorser.ChaincodeEventInfo)
- func (tm *TxManager) SendTransaction(th *endorser.TransactionHandler, c chan int, cc chan interface{}, ...) (string, string, error)
- func (tm *TxManager) WaitUntilTransactionSuccess(callback func(logCToUser interface{}) bool, query func(q ...interface{}) bool, ...)
Constants ¶
View Source
const ( // WaitTime = 10 * 60 * time.Second WaitTime = 100 * time.Second RandomSendTime = 10 RandomTransactoinHandlerCount = 1 MaxResendCount = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndorserConfig ¶
type EndorserConfig struct { Address string SN string EventAddress string ClientConfig endorser.ClientConfig GrpcClient *endorser.GRPCClient }
type OrdererConfig ¶
type OrdererConfig struct { OrdererAddress string OrdererSN string OrdererConfig endorser.ClientConfig OrdererClient *endorser.GRPCClient }
type TxManager ¶
type TxManager struct {
// contains filtered or unexported fields
}
func NewConsortiumNode ¶
func (*TxManager) GetCreator ¶
func (*TxManager) GetTransactionByID ¶
func (*TxManager) PickEndorserConfig ¶
func (tm *TxManager) PickEndorserConfig() (*EndorserConfig, error)
func (*TxManager) PickOrdererConfig ¶
func (tm *TxManager) PickOrdererConfig() (*OrdererConfig, error)
func (*TxManager) PickRandomTxHandler ¶
func (tm *TxManager) PickRandomTxHandler() (*endorser.TransactionHandler, error)
func (*TxManager) RandomTxHandler ¶
func (tm *TxManager) RandomTxHandler() (*endorser.TransactionHandler, error)
下次改成初始化一批,然后从中选取,而不是这样每次都new
func (*TxManager) RetraceEvent ¶
func (tm *TxManager) RetraceEvent(log chan event.ChaincodeEventInfo, config event.RetraceConf)
func (*TxManager) RollBack ¶
func (tm *TxManager) RollBack(userToC endorser.ChaincodeEventInfo)
func (*TxManager) SendTransaction ¶
Click to show internal directories.
Click to hide internal directories.