Documentation ¶
Index ¶
- type MockSelectionProvider
- type MockSelectionService
- type MockStaticDiscoveryProvider
- type MockStaticDiscoveryService
- type MockTransactor
- func (t *MockTransactor) CreateTransaction(request fab.TransactionRequest) (*fab.Transaction, error)
- func (t *MockTransactor) CreateTransactionHeader() (fab.TransactionHeader, error)
- func (t *MockTransactor) SendTransaction(tx *fab.Transaction) (*fab.TransactionResponse, error)
- func (t *MockTransactor) SendTransactionProposal(proposal *fab.TransactionProposal, targets []fab.ProposalProcessor) ([]*fab.TransactionProposalResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSelectionProvider ¶
MockSelectionProvider implements mock selection provider
func NewMockSelectionProvider ¶
func NewMockSelectionProvider(err error, peers []fab.Peer) (*MockSelectionProvider, error)
NewMockSelectionProvider returns mock selection provider
func (*MockSelectionProvider) CreateSelectionService ¶
func (dp *MockSelectionProvider) CreateSelectionService(channelID string) (*MockSelectionService, error)
CreateSelectionService returns mock selection service
type MockSelectionService ¶
MockSelectionService implements mock selection service
func (*MockSelectionService) GetEndorsersForChaincode ¶
func (ds *MockSelectionService) GetEndorsersForChaincode(chaincodeIDs []string, opts ...options.Opt) ([]fab.Peer, error)
GetEndorsersForChaincode mockcore retrieving endorsing peers
type MockStaticDiscoveryProvider ¶
MockStaticDiscoveryProvider implements mock discovery provider
func NewMockDiscoveryProvider ¶
func NewMockDiscoveryProvider(err error, peers []fab.Peer) (*MockStaticDiscoveryProvider, error)
NewMockDiscoveryProvider returns mock discovery provider
func (*MockStaticDiscoveryProvider) CreateDiscoveryService ¶
func (dp *MockStaticDiscoveryProvider) CreateDiscoveryService(channelID string) (fab.DiscoveryService, error)
CreateDiscoveryService return discovery service for specific channel
type MockStaticDiscoveryService ¶
MockStaticDiscoveryService implements mock discovery service
type MockTransactor ¶
MockTransactor provides an implementation of Transactor that exposes all its context.
func (*MockTransactor) CreateTransaction ¶
func (t *MockTransactor) CreateTransaction(request fab.TransactionRequest) (*fab.Transaction, error)
CreateTransaction create a transaction with proposal response.
func (*MockTransactor) CreateTransactionHeader ¶
func (t *MockTransactor) CreateTransactionHeader() (fab.TransactionHeader, error)
CreateTransactionHeader creates a Transaction Header based on the current context.
func (*MockTransactor) SendTransaction ¶
func (t *MockTransactor) SendTransaction(tx *fab.Transaction) (*fab.TransactionResponse, error)
SendTransaction send a transaction to the chain’s orderer service (one or more orderer endpoints) for consensus and committing to the ledger.
func (*MockTransactor) SendTransactionProposal ¶
func (t *MockTransactor) SendTransactionProposal(proposal *fab.TransactionProposal, targets []fab.ProposalProcessor) ([]*fab.TransactionProposalResponse, error)
SendTransactionProposal sends a TransactionProposal to the target peers.