mocks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) types.Reconfig

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

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) Close

func (_m *Batcher) Close()

Close provides a mock function with given fields:

func (*Batcher) Closed

func (_m *Batcher) Closed() bool

Closed 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) 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(viewNum uint64, stopView bool)

Complain provides a mock function with given fields: viewNum, stopView

type HeartbeatEventHandler

type HeartbeatEventHandler struct {
	mock.Mock
}

HeartbeatEventHandler is an autogenerated mock type for the HeartbeatEventHandler type

func (*HeartbeatEventHandler) OnHeartbeatTimeout

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

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

func (*HeartbeatEventHandler) Sync

func (_m *HeartbeatEventHandler) Sync()

Sync provides a mock function with given fields:

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) HeartbeatWasSent

func (_m *LeaderMonitor) HeartbeatWasSent()

HeartbeatWasSent provides a mock function with given fields:

func (*LeaderMonitor) InjectArtificialHeartbeat

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

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

func (*LeaderMonitor) ProcessMsg

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

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

type MembershipNotifierMock

type MembershipNotifierMock struct {
	mock.Mock
}

MembershipNotifierMock is an autogenerated mock type for the MembershipNotifierMock type

func (*MembershipNotifierMock) MembershipChange

func (_m *MembershipNotifierMock) MembershipChange() bool

MembershipChange provides a mock function with given fields:

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, decisionsInView uint64, quorumSize int) bft.Proposer

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

type Pruner

type Pruner struct {
	mock.Mock
}

Pruner is an autogenerated mock type for the Pruner type

func (*Pruner) MaybePruneRevokedRequests

func (_m *Pruner) MaybePruneRevokedRequests()

MaybePruneRevokedRequests provides a mock function with given fields:

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(maxCount int, maxSizeBytes uint64, check bool) ([][]byte, bool)

NextRequests provides a mock function with given fields: maxCount, maxSizeBytes, check

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(proposal types.Proposal, auxiliaryInput []byte) *types.Signature

SignProposal provides a mock function with given fields: proposal, auxiliaryInput

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

func (_m *SynchronizerMock) Sync() types.SyncResponse

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) AuxiliaryData

func (_m *VerifierMock) AuxiliaryData(_a0 []byte) []byte

AuxiliaryData provides a mock function with given fields: _a0

func (*VerifierMock) RequestsFromProposal

func (_m *VerifierMock) RequestsFromProposal(proposal types.Proposal) []types.RequestInfo

RequestsFromProposal provides a mock function with given fields: proposal

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) ([]byte, 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(view uint64)

AbortView provides a mock function with given fields: view

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