fabric: github.com/hyperledger/fabric/orderer/common/cluster/mocks Index | Files

package mocks

import "github.com/hyperledger/fabric/orderer/common/cluster/mocks"

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Code generated by counterfeiter. DO NOT EDIT.

Index

Package Files

block_retriever.go block_verifier.go chain_puller.go channel_lister.go cluster_client.go communicator.go dispatcher.go handler.go ledger_factory.go ledger_writer.go metrics_provider.go policy.go policy_manager.go secure_dialer.go signer_serializer.go step_client.go step_stream.go verifier_factory.go verifier_retriever.go

type BlockRetriever Uses

type BlockRetriever struct {
    mock.Mock
}

BlockRetriever is an autogenerated mock type for the BlockRetriever type

func (*BlockRetriever) Block Uses

func (_m *BlockRetriever) Block(number uint64) *common.Block

Block provides a mock function with given fields: number

type BlockVerifier Uses

type BlockVerifier struct {
    mock.Mock
}

BlockVerifier is an autogenerated mock type for the BlockVerifier type

func (*BlockVerifier) VerifyBlockSignature Uses

func (_m *BlockVerifier) VerifyBlockSignature(sd []*protoutil.SignedData, config *common.ConfigEnvelope) error

VerifyBlockSignature provides a mock function with given fields: sd, config

type ChainPuller Uses

type ChainPuller struct {
    mock.Mock
}

ChainPuller is an autogenerated mock type for the ChainPuller type

func (*ChainPuller) Close Uses

func (_m *ChainPuller) Close()

Close provides a mock function with given fields:

func (*ChainPuller) HeightsByEndpoints Uses

func (_m *ChainPuller) HeightsByEndpoints() (map[string]uint64, error)

HeightsByEndpoints provides a mock function with given fields:

func (*ChainPuller) PullBlock Uses

func (_m *ChainPuller) PullBlock(seq uint64) *common.Block

PullBlock provides a mock function with given fields: seq

type ChannelLister Uses

type ChannelLister struct {
    mock.Mock
}

ChannelLister is an autogenerated mock type for the ChannelLister type

func (*ChannelLister) Channels Uses

func (_m *ChannelLister) Channels() []cluster.ChannelGenesisBlock

Channels provides a mock function with given fields:

func (*ChannelLister) Close Uses

func (_m *ChannelLister) Close()

Close provides a mock function with given fields:

type ClusterClient Uses

type ClusterClient struct {
    mock.Mock
}

ClusterClient is an autogenerated mock type for the ClusterClient type

func (*ClusterClient) Step Uses

func (_m *ClusterClient) Step(ctx context.Context, opts ...grpc.CallOption) (orderer.Cluster_StepClient, error)

Step provides a mock function with given fields: ctx, opts

type Communicator Uses

type Communicator struct {
    mock.Mock
}

Communicator is an autogenerated mock type for the Communicator type

func (*Communicator) Configure Uses

func (_m *Communicator) Configure(channel string, members []cluster.RemoteNode)

Configure provides a mock function with given fields: channel, members

func (*Communicator) Remote Uses

func (_m *Communicator) Remote(channel string, id uint64) (*cluster.RemoteContext, error)

Remote provides a mock function with given fields: channel, id

func (*Communicator) Shutdown Uses

func (_m *Communicator) Shutdown()

Shutdown provides a mock function with given fields:

type Dispatcher Uses

type Dispatcher struct {
    mock.Mock
}

Dispatcher is an autogenerated mock type for the Dispatcher type

func (*Dispatcher) DispatchConsensus Uses

func (_m *Dispatcher) DispatchConsensus(ctx context.Context, request *orderer.ConsensusRequest) error

DispatchConsensus provides a mock function with given fields: ctx, request

func (*Dispatcher) DispatchSubmit Uses

func (_m *Dispatcher) DispatchSubmit(ctx context.Context, request *orderer.SubmitRequest) error

DispatchSubmit provides a mock function with given fields: ctx, request

type Handler Uses

type Handler struct {
    mock.Mock
}

Handler is an autogenerated mock type for the Handler type

func (*Handler) OnConsensus Uses

func (_m *Handler) OnConsensus(channel string, sender uint64, req *orderer.ConsensusRequest) error

OnConsensus provides a mock function with given fields: channel, sender, req

func (*Handler) OnSubmit Uses

func (_m *Handler) OnSubmit(channel string, sender uint64, req *orderer.SubmitRequest) error

OnSubmit provides a mock function with given fields: channel, sender, req

type LedgerFactory Uses

type LedgerFactory struct {
    mock.Mock
}

LedgerFactory is an autogenerated mock type for the LedgerFactory type

func (*LedgerFactory) GetOrCreate Uses

func (_m *LedgerFactory) GetOrCreate(chainID string) (cluster.LedgerWriter, error)

GetOrCreate provides a mock function with given fields: chainID

type LedgerWriter Uses

type LedgerWriter struct {
    mock.Mock
}

LedgerWriter is an autogenerated mock type for the LedgerWriter type

func (*LedgerWriter) Append Uses

func (_m *LedgerWriter) Append(block *common.Block) error

Append provides a mock function with given fields: block

func (*LedgerWriter) Height Uses

func (_m *LedgerWriter) Height() uint64

Height provides a mock function with given fields:

type MetricsProvider Uses

type MetricsProvider struct {
    mock.Mock
}

MetricsProvider is an autogenerated mock type for the MetricsProvider type

func (*MetricsProvider) NewCounter Uses

func (_m *MetricsProvider) NewCounter(opts metrics.CounterOpts) metrics.Counter

NewCounter provides a mock function with given fields: opts

func (*MetricsProvider) NewGauge Uses

func (_m *MetricsProvider) NewGauge(opts metrics.GaugeOpts) metrics.Gauge

NewGauge provides a mock function with given fields: opts

func (*MetricsProvider) NewHistogram Uses

func (_m *MetricsProvider) NewHistogram(opts metrics.HistogramOpts) metrics.Histogram

NewHistogram provides a mock function with given fields: opts

type Policy Uses

type Policy struct {
    EvaluateIdentitiesStub func([]msp.Identity) error

    EvaluateSignedDataStub func([]*protoutil.SignedData) error
    // contains filtered or unexported fields
}

func (*Policy) EvaluateIdentities Uses

func (fake *Policy) EvaluateIdentities(arg1 []msp.Identity) error

func (*Policy) EvaluateIdentitiesArgsForCall Uses

func (fake *Policy) EvaluateIdentitiesArgsForCall(i int) []msp.Identity

func (*Policy) EvaluateIdentitiesCallCount Uses

func (fake *Policy) EvaluateIdentitiesCallCount() int

func (*Policy) EvaluateIdentitiesCalls Uses

func (fake *Policy) EvaluateIdentitiesCalls(stub func([]msp.Identity) error)

func (*Policy) EvaluateIdentitiesReturns Uses

func (fake *Policy) EvaluateIdentitiesReturns(result1 error)

func (*Policy) EvaluateIdentitiesReturnsOnCall Uses

func (fake *Policy) EvaluateIdentitiesReturnsOnCall(i int, result1 error)

func (*Policy) EvaluateSignedData Uses

func (fake *Policy) EvaluateSignedData(arg1 []*protoutil.SignedData) error

func (*Policy) EvaluateSignedDataArgsForCall Uses

func (fake *Policy) EvaluateSignedDataArgsForCall(i int) []*protoutil.SignedData

func (*Policy) EvaluateSignedDataCallCount Uses

func (fake *Policy) EvaluateSignedDataCallCount() int

func (*Policy) EvaluateSignedDataCalls Uses

func (fake *Policy) EvaluateSignedDataCalls(stub func([]*protoutil.SignedData) error)

func (*Policy) EvaluateSignedDataReturns Uses

func (fake *Policy) EvaluateSignedDataReturns(result1 error)

func (*Policy) EvaluateSignedDataReturnsOnCall Uses

func (fake *Policy) EvaluateSignedDataReturnsOnCall(i int, result1 error)

func (*Policy) Invocations Uses

func (fake *Policy) Invocations() map[string][][]interface{}

type PolicyManager Uses

type PolicyManager struct {
    GetPolicyStub func(string) (policies.Policy, bool)

    ManagerStub func([]string) (policies.Manager, bool)
    // contains filtered or unexported fields
}

func (*PolicyManager) GetPolicy Uses

func (fake *PolicyManager) GetPolicy(arg1 string) (policies.Policy, bool)

func (*PolicyManager) GetPolicyArgsForCall Uses

func (fake *PolicyManager) GetPolicyArgsForCall(i int) string

func (*PolicyManager) GetPolicyCallCount Uses

func (fake *PolicyManager) GetPolicyCallCount() int

func (*PolicyManager) GetPolicyCalls Uses

func (fake *PolicyManager) GetPolicyCalls(stub func(string) (policies.Policy, bool))

func (*PolicyManager) GetPolicyReturns Uses

func (fake *PolicyManager) GetPolicyReturns(result1 policies.Policy, result2 bool)

func (*PolicyManager) GetPolicyReturnsOnCall Uses

func (fake *PolicyManager) GetPolicyReturnsOnCall(i int, result1 policies.Policy, result2 bool)

func (*PolicyManager) Invocations Uses

func (fake *PolicyManager) Invocations() map[string][][]interface{}

func (*PolicyManager) Manager Uses

func (fake *PolicyManager) Manager(arg1 []string) (policies.Manager, bool)

func (*PolicyManager) ManagerArgsForCall Uses

func (fake *PolicyManager) ManagerArgsForCall(i int) []string

func (*PolicyManager) ManagerCallCount Uses

func (fake *PolicyManager) ManagerCallCount() int

func (*PolicyManager) ManagerCalls Uses

func (fake *PolicyManager) ManagerCalls(stub func([]string) (policies.Manager, bool))

func (*PolicyManager) ManagerReturns Uses

func (fake *PolicyManager) ManagerReturns(result1 policies.Manager, result2 bool)

func (*PolicyManager) ManagerReturnsOnCall Uses

func (fake *PolicyManager) ManagerReturnsOnCall(i int, result1 policies.Manager, result2 bool)

type SecureDialer Uses

type SecureDialer struct {
    mock.Mock
}

SecureDialer is an autogenerated mock type for the SecureDialer type

func (*SecureDialer) Dial Uses

func (_m *SecureDialer) Dial(address string, verifyFunc cluster.RemoteVerifier) (*grpc.ClientConn, error)

Dial provides a mock function with given fields: address, verifyFunc

type SignerSerializer Uses

type SignerSerializer struct {
    SerializeStub func() ([]byte, error)

    SignStub func([]byte) ([]byte, error)
    // contains filtered or unexported fields
}

func (*SignerSerializer) Invocations Uses

func (fake *SignerSerializer) Invocations() map[string][][]interface{}

func (*SignerSerializer) Serialize Uses

func (fake *SignerSerializer) Serialize() ([]byte, error)

func (*SignerSerializer) SerializeCallCount Uses

func (fake *SignerSerializer) SerializeCallCount() int

func (*SignerSerializer) SerializeCalls Uses

func (fake *SignerSerializer) SerializeCalls(stub func() ([]byte, error))

func (*SignerSerializer) SerializeReturns Uses

func (fake *SignerSerializer) SerializeReturns(result1 []byte, result2 error)

func (*SignerSerializer) SerializeReturnsOnCall Uses

func (fake *SignerSerializer) SerializeReturnsOnCall(i int, result1 []byte, result2 error)

func (*SignerSerializer) Sign Uses

func (fake *SignerSerializer) Sign(arg1 []byte) ([]byte, error)

func (*SignerSerializer) SignArgsForCall Uses

func (fake *SignerSerializer) SignArgsForCall(i int) []byte

func (*SignerSerializer) SignCallCount Uses

func (fake *SignerSerializer) SignCallCount() int

func (*SignerSerializer) SignCalls Uses

func (fake *SignerSerializer) SignCalls(stub func([]byte) ([]byte, error))

func (*SignerSerializer) SignReturns Uses

func (fake *SignerSerializer) SignReturns(result1 []byte, result2 error)

func (*SignerSerializer) SignReturnsOnCall Uses

func (fake *SignerSerializer) SignReturnsOnCall(i int, result1 []byte, result2 error)

type StepClient Uses

type StepClient struct {
    mock.Mock
}

StepClient is an autogenerated mock type for the StepClient type

func (*StepClient) CloseSend Uses

func (_m *StepClient) CloseSend() error

CloseSend provides a mock function with given fields:

func (*StepClient) Context Uses

func (_m *StepClient) Context() context.Context

Context provides a mock function with given fields:

func (*StepClient) Header Uses

func (_m *StepClient) Header() (metadata.MD, error)

Header provides a mock function with given fields:

func (*StepClient) Recv Uses

func (_m *StepClient) Recv() (*orderer.StepResponse, error)

Recv provides a mock function with given fields:

func (*StepClient) RecvMsg Uses

func (_m *StepClient) RecvMsg(m interface{}) error

RecvMsg provides a mock function with given fields: m

func (*StepClient) Send Uses

func (_m *StepClient) Send(_a0 *orderer.StepRequest) error

Send provides a mock function with given fields: _a0

func (*StepClient) SendMsg Uses

func (_m *StepClient) SendMsg(m interface{}) error

SendMsg provides a mock function with given fields: m

func (*StepClient) Trailer Uses

func (_m *StepClient) Trailer() metadata.MD

Trailer provides a mock function with given fields:

type StepStream Uses

type StepStream struct {
    mock.Mock
}

StepStream is an autogenerated mock type for the StepStream type

func (*StepStream) Context Uses

func (_m *StepStream) Context() context.Context

Context provides a mock function with given fields:

func (*StepStream) Recv Uses

func (_m *StepStream) Recv() (*orderer.StepRequest, error)

Recv provides a mock function with given fields:

func (*StepStream) RecvMsg Uses

func (_m *StepStream) RecvMsg(m interface{}) error

RecvMsg provides a mock function with given fields: m

func (*StepStream) Send Uses

func (_m *StepStream) Send(response *orderer.StepResponse) error

Send provides a mock function with given fields: response

func (*StepStream) SendHeader Uses

func (_m *StepStream) SendHeader(_a0 metadata.MD) error

SendHeader provides a mock function with given fields: _a0

func (*StepStream) SendMsg Uses

func (_m *StepStream) SendMsg(m interface{}) error

SendMsg provides a mock function with given fields: m

func (*StepStream) SetHeader Uses

func (_m *StepStream) SetHeader(_a0 metadata.MD) error

SetHeader provides a mock function with given fields: _a0

func (*StepStream) SetTrailer Uses

func (_m *StepStream) SetTrailer(_a0 metadata.MD)

SetTrailer provides a mock function with given fields: _a0

type VerifierFactory Uses

type VerifierFactory struct {
    mock.Mock
}

VerifierFactory is an autogenerated mock type for the VerifierFactory type

func (*VerifierFactory) VerifierFromConfig Uses

func (_m *VerifierFactory) VerifierFromConfig(configuration *common.ConfigEnvelope, channel string) (cluster.BlockVerifier, error)

VerifierFromConfig provides a mock function with given fields: configuration, channel

type VerifierRetriever Uses

type VerifierRetriever struct {
    mock.Mock
}

VerifierRetriever is an autogenerated mock type for the VerifierRetriever type

func (*VerifierRetriever) RetrieveVerifier Uses

func (_m *VerifierRetriever) RetrieveVerifier(channel string) cluster.BlockVerifier

RetrieveVerifier provides a mock function with given fields: channel

Package mocks imports 12 packages (graph). Updated 2019-11-17. Refresh now. Tools for package owners.