Documentation ¶
Index ¶
- func CreateChaincodeProposalWithTxIDAndTransient(chainID string, spec *pb.ChaincodeSpec, creator []byte, ...) (*pb.Proposal, string, error)
- func GetSignedProposal(prop *pb.Proposal, signer msp.SigningIdentity) (*pb.SignedProposal, error)
- func InitCrypto(m *mspex.MspEnv) error
- type BroadcastClient
- type ChaincodeEnv
- type NodeEnv
- type OrderEnv
- type PeerEnv
- type RPC
- type RPCBuilder
- func (r *RPCBuilder) CloseConn()
- func (r *RPCBuilder) InitConn(isOrdererRequired bool) error
- func (r *RPCBuilder) Invoke(args [][]byte) (string, error)
- func (r *RPCBuilder) PreHande(invoke bool) (string, error)
- func (r *RPCBuilder) Query(args [][]byte) ([]byte, error)
- func (r *RPCBuilder) VerifyConn(isOrdererRequired bool) error
- type RPCManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChaincodeProposalWithTxIDAndTransient ¶
func CreateChaincodeProposalWithTxIDAndTransient(chainID string, spec *pb.ChaincodeSpec, creator []byte, transientMap map[string][]byte) (*pb.Proposal, string, error)
CreateChaincodeProposalWithTxIDAndTransient creates a proposal from given input It returns the proposal and the transaction id associated to the proposal
func GetSignedProposal ¶
func GetSignedProposal(prop *pb.Proposal, signer msp.SigningIdentity) (*pb.SignedProposal, error)
GetSignedProposal returns a signed proposal given a Proposal message and a signing identity
Types ¶
type BroadcastClient ¶
type ChaincodeEnv ¶
type NodeEnv ¶
type OrderEnv ¶
type OrderEnv struct {
*NodeEnv
}
OrderEnv 节点的数据
func (*OrderEnv) NewBroadcastClient ¶
func (order *OrderEnv) NewBroadcastClient() (BroadcastClient, error)
type PeerEnv ¶
type PeerEnv struct {
*NodeEnv
}
func (*PeerEnv) NewEndorserClient ¶
func (peer *PeerEnv) NewEndorserClient() pb.EndorserClient
type RPC ¶
type RPC struct{}
depecrated
func (*RPC) NewManager ¶
func (_ *RPC) NewManager() *RPCManager
type RPCBuilder ¶
type RPCBuilder struct { *ChaincodeEnv *msp.MspEnv *OrderEnv // *PeersEnv Peers []*PeerEnv ConnManager *RPCManager TxTimeout time.Duration }
RPCBuilder rpc客户端公共数据
func NewRpcBuilder ¶
func NewRpcBuilder() *RPCBuilder
func (*RPCBuilder) InitConn ¶
func (r *RPCBuilder) InitConn(isOrdererRequired bool) error
InitConn 初始化chaincode命令工厂
func (*RPCBuilder) Query ¶
func (r *RPCBuilder) Query(args [][]byte) ([]byte, error)
Query 查询 格式: args:[]string{"a"} 代表查询a的值 跟方法名要匹配
func (*RPCBuilder) VerifyConn ¶
func (r *RPCBuilder) VerifyConn(isOrdererRequired bool) error
VerifyConn 校验连接
type RPCManager ¶
type RPCManager struct {
// contains filtered or unexported fields
}
func NewRpcManager ¶
func NewRpcManager() *RPCManager
func (*RPCManager) Cancel ¶
func (m *RPCManager) Cancel()
func (*RPCManager) Context ¶
func (m *RPCManager) Context() context.Context
Click to show internal directories.
Click to hide internal directories.