Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChaincodeInvokeOrQuery ¶
func ChaincodeInvokeOrQuery( spec *pb.ChaincodeSpec, cID string, txID string, invoke bool, signer msp.SigningIdentity, certificate tls.Certificate, endorserClients []pb.EndorserClient, deliverClients []api.PeerDeliverClient, bc common.BroadcastClient, ) (*pb.ProposalResponse, error)
chaincodeinvokeorquery调用或查询chaincode。如果成功, invoke form将ProposalResponse打印到stdout,并打印查询表单 stdout上的查询结果。命令行标志(-r,-raw)确定 查询结果是作为原始字节输出还是作为可打印字符串输出。 可打印表单是可选的(-x,-hex)十六进制表示形式 查询响应的。如果查询响应为零,则不输出任何内容。
注意-查询可能会消失,因为与背书人的所有交互都是 提案和提案响应
Types ¶
type ChaincodeCmdFactory ¶
type ChaincodeCmdFactory struct { EndorserClients []pb.EndorserClient DeliverClients []api.PeerDeliverClient Certificate tls.Certificate Signer msp.SigningIdentity BroadcastClient common.BroadcastClient }
ChaincodeCmdFactory保留ChaincodeCmd使用的客户端
func InitCmdFactory ¶
func InitCmdFactory(cmdName string, isEndorserRequired, isOrdererRequired bool) (*ChaincodeCmdFactory, error)
initcmdfactory用默认客户端初始化chaincodeCmdFactory
Source Files ¶
Click to show internal directories.
Click to hide internal directories.