mocks

package
v0.0.0-...-496c6ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationMock

type ApplicationMock struct {
	mock.Mock
}

ApplicationMock is an autogenerated mock type for the ApplicationMock type

func (*ApplicationMock) Deliver

func (_m *ApplicationMock) Deliver(proposal types.Proposal, signature []types.Signature)

Deliver provides a mock function with given fields: proposal, signature

type AssemblerMock

type AssemblerMock struct {
	mock.Mock
}

AssemblerMock is an autogenerated mock type for the AssemblerMock type

func (*AssemblerMock) AssembleProposal

func (_m *AssemblerMock) AssembleProposal(metadata []byte, requests [][]byte) (types.Proposal, [][]byte)

AssembleProposal provides a mock function with given fields: metadata, requests

type Batcher

type Batcher struct {
	mock.Mock
}

Batcher is an autogenerated mock type for the Batcher type

func (*Batcher) BatchRemainder

func (_m *Batcher) BatchRemainder(remainder [][]byte)

BatchRemainder provides a mock function with given fields: remainder

func (*Batcher) Close

func (_m *Batcher) Close()

Close provides a mock function with given fields:

func (*Batcher) NextBatch

func (_m *Batcher) NextBatch() [][]byte

NextBatch provides a mock function with given fields:

func (*Batcher) PopRemainder

func (_m *Batcher) PopRemainder() [][]byte

PopRemainder provides a mock function with given fields:

func (*Batcher) Reset

func (_m *Batcher) Reset()

Reset provides a mock function with given fields:

type CommMock

type CommMock struct {
	mock.Mock
}

CommMock is an autogenerated mock type for the CommMock type

func (*CommMock) BroadcastConsensus

func (_m *CommMock) BroadcastConsensus(m *smartbftprotos.Message)

BroadcastConsensus provides a mock function with given fields: m

func (*CommMock) Nodes

func (_m *CommMock) Nodes() []uint64

Nodes provides a mock function with given fields:

func (*CommMock) SendConsensus

func (_m *CommMock) SendConsensus(targetID uint64, m *smartbftprotos.Message)

SendConsensus provides a mock function with given fields: targetID, m

func (*CommMock) SendTransaction

func (_m *CommMock) SendTransaction(targetID uint64, request []byte)

SendTransaction provides a mock function with given fields: targetID, request

type Decider

type Decider struct {
	mock.Mock
}

Decider is an autogenerated mock type for the Decider type

func (*Decider) Decide

func (_m *Decider) Decide(proposal types.Proposal, signatures []types.Signature, requests []types.RequestInfo)

Decide provides a mock function with given fields: proposal, signatures, requests

type FailureDetector

type FailureDetector struct {
	mock.Mock
}

FailureDetector is an autogenerated mock type for the FailureDetector type

func (*FailureDetector) Complain

func (_m *FailureDetector) Complain(stopView bool)

Complain provides a mock function with given fields: stopView

type HeartbeatTimeoutHandler

type HeartbeatTimeoutHandler struct {
	mock.Mock
}

HeartbeatTimeoutHandler is an autogenerated mock type for the HeartbeatTimeoutHandler type

func (*HeartbeatTimeoutHandler) OnHeartbeatTimeout

func (_m *HeartbeatTimeoutHandler) OnHeartbeatTimeout(view uint64, leaderID uint64)

OnHeartbeatTimeout provides a mock function with given fields: view, leaderID

type LeaderMonitor

type LeaderMonitor struct {
	mock.Mock
}

LeaderMonitor is an autogenerated mock type for the LeaderMonitor type

func (*LeaderMonitor) ChangeRole

func (_m *LeaderMonitor) ChangeRole(role bft.Role, view uint64, leaderID uint64)

ChangeRole provides a mock function with given fields: role, view, leaderID

func (*LeaderMonitor) Close

func (_m *LeaderMonitor) Close()

Close provides a mock function with given fields:

func (*LeaderMonitor) ProcessMsg

func (_m *LeaderMonitor) ProcessMsg(sender uint64, msg *smartbftprotos.Message)

ProcessMsg provides a mock function with given fields: sender, msg

type ProposerBuilder

type ProposerBuilder struct {
	mock.Mock
}

ProposerBuilder is an autogenerated mock type for the ProposerBuilder type

func (*ProposerBuilder) NewProposer

func (_m *ProposerBuilder) NewProposer(leader uint64, proposalSequence uint64, viewNum uint64, quorumSize int) bft.Proposer

NewProposer provides a mock function with given fields: leader, proposalSequence, viewNum, quorumSize

type RequestPool

type RequestPool struct {
	mock.Mock
}

RequestPool is an autogenerated mock type for the RequestPool type

func (*RequestPool) Close

func (_m *RequestPool) Close()

Close provides a mock function with given fields:

func (*RequestPool) NextRequests

func (_m *RequestPool) NextRequests(n int) [][]byte

NextRequests provides a mock function with given fields: n

func (*RequestPool) Prune

func (_m *RequestPool) Prune(predicate func([]byte) error)

Prune provides a mock function with given fields: predicate

func (*RequestPool) RemoveRequest

func (_m *RequestPool) RemoveRequest(request types.RequestInfo) error

RemoveRequest provides a mock function with given fields: request

func (*RequestPool) RestartTimers

func (_m *RequestPool) RestartTimers()

RestartTimers provides a mock function with given fields:

func (*RequestPool) Size

func (_m *RequestPool) Size() int

Size provides a mock function with given fields:

func (*RequestPool) StopTimers

func (_m *RequestPool) StopTimers()

StopTimers provides a mock function with given fields:

func (*RequestPool) Submit

func (_m *RequestPool) Submit(request []byte) error

Submit provides a mock function with given fields: request

type RequestTimeoutHandler

type RequestTimeoutHandler struct {
	mock.Mock
}

RequestTimeoutHandler is an autogenerated mock type for the RequestTimeoutHandler type

func (*RequestTimeoutHandler) OnAutoRemoveTimeout

func (_m *RequestTimeoutHandler) OnAutoRemoveTimeout(requestInfo types.RequestInfo)

OnAutoRemoveTimeout provides a mock function with given fields: requestInfo

func (*RequestTimeoutHandler) OnLeaderFwdRequestTimeout

func (_m *RequestTimeoutHandler) OnLeaderFwdRequestTimeout(request []byte, requestInfo types.RequestInfo)

OnLeaderFwdRequestTimeout provides a mock function with given fields: request, requestInfo

func (*RequestTimeoutHandler) OnRequestTimeout

func (_m *RequestTimeoutHandler) OnRequestTimeout(request []byte, requestInfo types.RequestInfo)

OnRequestTimeout provides a mock function with given fields: request, requestInfo

type RequestsTimer

type RequestsTimer struct {
	mock.Mock
}

RequestsTimer is an autogenerated mock type for the RequestsTimer type

func (*RequestsTimer) RemoveRequest

func (_m *RequestsTimer) RemoveRequest(request types.RequestInfo) error

RemoveRequest provides a mock function with given fields: request

func (*RequestsTimer) RestartTimers

func (_m *RequestsTimer) RestartTimers()

RestartTimers provides a mock function with given fields:

func (*RequestsTimer) StopTimers

func (_m *RequestsTimer) StopTimers()

StopTimers provides a mock function with given fields:

type SignerMock

type SignerMock struct {
	mock.Mock
}

SignerMock is an autogenerated mock type for the SignerMock type

func (*SignerMock) Sign

func (_m *SignerMock) Sign(_a0 []byte) []byte

Sign provides a mock function with given fields: _a0

func (*SignerMock) SignProposal

func (_m *SignerMock) SignProposal(_a0 types.Proposal) *types.Signature

SignProposal provides a mock function with given fields: _a0

type State

type State struct {
	mock.Mock
}

State is an autogenerated mock type for the State type

func (*State) Restore

func (_m *State) Restore(_a0 *bft.View) error

Restore provides a mock function with given fields: _a0

func (*State) Save

func (_m *State) Save(message *smartbftprotos.SavedMessage) error

Save provides a mock function with given fields: message

type Synchronizer

type Synchronizer struct {
	mock.Mock
}

Synchronizer is an autogenerated mock type for the Synchronizer type

func (*Synchronizer) Sync

func (_m *Synchronizer) Sync()

Sync provides a mock function with given fields:

type SynchronizerMock

type SynchronizerMock struct {
	mock.Mock
}

SynchronizerMock is an autogenerated mock type for the SynchronizerMock type

func (*SynchronizerMock) Sync

Sync provides a mock function with given fields:

type VerifierMock

type VerifierMock struct {
	mock.Mock
}

VerifierMock is an autogenerated mock type for the VerifierMock type

func (*VerifierMock) VerificationSequence

func (_m *VerifierMock) VerificationSequence() uint64

VerificationSequence provides a mock function with given fields:

func (*VerifierMock) VerifyConsenterSig

func (_m *VerifierMock) VerifyConsenterSig(signature types.Signature, prop types.Proposal) error

VerifyConsenterSig provides a mock function with given fields: signature, prop

func (*VerifierMock) VerifyProposal

func (_m *VerifierMock) VerifyProposal(proposal types.Proposal) ([]types.RequestInfo, error)

VerifyProposal provides a mock function with given fields: proposal

func (*VerifierMock) VerifyRequest

func (_m *VerifierMock) VerifyRequest(val []byte) (types.RequestInfo, error)

VerifyRequest provides a mock function with given fields: val

func (*VerifierMock) VerifySignature

func (_m *VerifierMock) VerifySignature(signature types.Signature) error

VerifySignature provides a mock function with given fields: signature

type ViewController

type ViewController struct {
	mock.Mock
}

ViewController is an autogenerated mock type for the ViewController type

func (*ViewController) AbortView

func (_m *ViewController) AbortView()

AbortView provides a mock function with given fields:

func (*ViewController) ViewChanged

func (_m *ViewController) ViewChanged(newViewNumber uint64, newProposalSequence uint64)

ViewChanged provides a mock function with given fields: newViewNumber, newProposalSequence

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL