mocks

package
v0.0.0-...-011bec4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consensus

type Consensus struct {
	mock.Mock
}

Consensus is an autogenerated mock type for the Consensus type

func NewConsensus

func NewConsensus(t interface {
	mock.TestingT
	Cleanup(func())
}) *Consensus

NewConsensus creates a new instance of Consensus. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Consensus) AddNonVoter

func (_m *Consensus) AddNonVoter(id string, addr string) error

AddNonVoter provides a mock function with given fields: id, addr

func (*Consensus) AddVoter

func (_m *Consensus) AddVoter(id string, addr string) error

AddVoter provides a mock function with given fields: id, addr

func (*Consensus) ClusterMembership

func (_m *Consensus) ClusterMembership() ([]*consensus.ServerInfo, error)

ClusterMembership provides a mock function with given fields:

func (*Consensus) CommitUnsafePayload

func (_m *Consensus) CommitUnsafePayload(payload *eth.ExecutionPayloadEnvelope) error

CommitUnsafePayload provides a mock function with given fields: payload

func (*Consensus) DemoteVoter

func (_m *Consensus) DemoteVoter(id string) error

DemoteVoter provides a mock function with given fields: id

func (*Consensus) EXPECT

func (_m *Consensus) EXPECT() *Consensus_Expecter

func (*Consensus) LatestUnsafePayload

func (_m *Consensus) LatestUnsafePayload() (*eth.ExecutionPayloadEnvelope, error)

LatestUnsafePayload provides a mock function with given fields:

func (*Consensus) Leader

func (_m *Consensus) Leader() bool

Leader provides a mock function with given fields:

func (*Consensus) LeaderCh

func (_m *Consensus) LeaderCh() <-chan bool

LeaderCh provides a mock function with given fields:

func (*Consensus) LeaderWithID

func (_m *Consensus) LeaderWithID() *consensus.ServerInfo

LeaderWithID provides a mock function with given fields:

func (*Consensus) RemoveServer

func (_m *Consensus) RemoveServer(id string) error

RemoveServer provides a mock function with given fields: id

func (*Consensus) ServerID

func (_m *Consensus) ServerID() string

ServerID provides a mock function with given fields:

func (*Consensus) Shutdown

func (_m *Consensus) Shutdown() error

Shutdown provides a mock function with given fields:

func (*Consensus) TransferLeader

func (_m *Consensus) TransferLeader() error

TransferLeader provides a mock function with given fields:

func (*Consensus) TransferLeaderTo

func (_m *Consensus) TransferLeaderTo(id string, addr string) error

TransferLeaderTo provides a mock function with given fields: id, addr

type Consensus_AddNonVoter_Call

type Consensus_AddNonVoter_Call struct {
	*mock.Call
}

Consensus_AddNonVoter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddNonVoter'

func (*Consensus_AddNonVoter_Call) Return

func (*Consensus_AddNonVoter_Call) Run

func (*Consensus_AddNonVoter_Call) RunAndReturn

type Consensus_AddVoter_Call

type Consensus_AddVoter_Call struct {
	*mock.Call
}

Consensus_AddVoter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddVoter'

func (*Consensus_AddVoter_Call) Return

func (*Consensus_AddVoter_Call) Run

func (_c *Consensus_AddVoter_Call) Run(run func(id string, addr string)) *Consensus_AddVoter_Call

func (*Consensus_AddVoter_Call) RunAndReturn

func (_c *Consensus_AddVoter_Call) RunAndReturn(run func(string, string) error) *Consensus_AddVoter_Call

type Consensus_ClusterMembership_Call

type Consensus_ClusterMembership_Call struct {
	*mock.Call
}

Consensus_ClusterMembership_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClusterMembership'

func (*Consensus_ClusterMembership_Call) Return

func (*Consensus_ClusterMembership_Call) Run

func (*Consensus_ClusterMembership_Call) RunAndReturn

type Consensus_CommitUnsafePayload_Call

type Consensus_CommitUnsafePayload_Call struct {
	*mock.Call
}

Consensus_CommitUnsafePayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitUnsafePayload'

func (*Consensus_CommitUnsafePayload_Call) Return

func (*Consensus_CommitUnsafePayload_Call) Run

func (*Consensus_CommitUnsafePayload_Call) RunAndReturn

type Consensus_DemoteVoter_Call

type Consensus_DemoteVoter_Call struct {
	*mock.Call
}

Consensus_DemoteVoter_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DemoteVoter'

func (*Consensus_DemoteVoter_Call) Return

func (*Consensus_DemoteVoter_Call) Run

func (*Consensus_DemoteVoter_Call) RunAndReturn

type Consensus_Expecter

type Consensus_Expecter struct {
	// contains filtered or unexported fields
}

func (*Consensus_Expecter) AddNonVoter

func (_e *Consensus_Expecter) AddNonVoter(id interface{}, addr interface{}) *Consensus_AddNonVoter_Call

AddNonVoter is a helper method to define mock.On call

  • id string
  • addr string

func (*Consensus_Expecter) AddVoter

func (_e *Consensus_Expecter) AddVoter(id interface{}, addr interface{}) *Consensus_AddVoter_Call

AddVoter is a helper method to define mock.On call

  • id string
  • addr string

func (*Consensus_Expecter) ClusterMembership

func (_e *Consensus_Expecter) ClusterMembership() *Consensus_ClusterMembership_Call

ClusterMembership is a helper method to define mock.On call

func (*Consensus_Expecter) CommitUnsafePayload

func (_e *Consensus_Expecter) CommitUnsafePayload(payload interface{}) *Consensus_CommitUnsafePayload_Call

CommitUnsafePayload is a helper method to define mock.On call

  • payload *eth.ExecutionPayloadEnvelope

func (*Consensus_Expecter) DemoteVoter

func (_e *Consensus_Expecter) DemoteVoter(id interface{}) *Consensus_DemoteVoter_Call

DemoteVoter is a helper method to define mock.On call

  • id string

func (*Consensus_Expecter) LatestUnsafePayload

func (_e *Consensus_Expecter) LatestUnsafePayload() *Consensus_LatestUnsafePayload_Call

LatestUnsafePayload is a helper method to define mock.On call

func (*Consensus_Expecter) Leader

Leader is a helper method to define mock.On call

func (*Consensus_Expecter) LeaderCh

LeaderCh is a helper method to define mock.On call

func (*Consensus_Expecter) LeaderWithID

func (_e *Consensus_Expecter) LeaderWithID() *Consensus_LeaderWithID_Call

LeaderWithID is a helper method to define mock.On call

func (*Consensus_Expecter) RemoveServer

func (_e *Consensus_Expecter) RemoveServer(id interface{}) *Consensus_RemoveServer_Call

RemoveServer is a helper method to define mock.On call

  • id string

func (*Consensus_Expecter) ServerID

ServerID is a helper method to define mock.On call

func (*Consensus_Expecter) Shutdown

Shutdown is a helper method to define mock.On call

func (*Consensus_Expecter) TransferLeader

func (_e *Consensus_Expecter) TransferLeader() *Consensus_TransferLeader_Call

TransferLeader is a helper method to define mock.On call

func (*Consensus_Expecter) TransferLeaderTo

func (_e *Consensus_Expecter) TransferLeaderTo(id interface{}, addr interface{}) *Consensus_TransferLeaderTo_Call

TransferLeaderTo is a helper method to define mock.On call

  • id string
  • addr string

type Consensus_LatestUnsafePayload_Call

type Consensus_LatestUnsafePayload_Call struct {
	*mock.Call
}

Consensus_LatestUnsafePayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LatestUnsafePayload'

func (*Consensus_LatestUnsafePayload_Call) Return

func (*Consensus_LatestUnsafePayload_Call) Run

func (*Consensus_LatestUnsafePayload_Call) RunAndReturn

type Consensus_LeaderCh_Call

type Consensus_LeaderCh_Call struct {
	*mock.Call
}

Consensus_LeaderCh_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LeaderCh'

func (*Consensus_LeaderCh_Call) Return

func (_c *Consensus_LeaderCh_Call) Return(_a0 <-chan bool) *Consensus_LeaderCh_Call

func (*Consensus_LeaderCh_Call) Run

func (_c *Consensus_LeaderCh_Call) Run(run func()) *Consensus_LeaderCh_Call

func (*Consensus_LeaderCh_Call) RunAndReturn

func (_c *Consensus_LeaderCh_Call) RunAndReturn(run func() <-chan bool) *Consensus_LeaderCh_Call

type Consensus_LeaderWithID_Call

type Consensus_LeaderWithID_Call struct {
	*mock.Call
}

Consensus_LeaderWithID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LeaderWithID'

func (*Consensus_LeaderWithID_Call) Return

func (*Consensus_LeaderWithID_Call) Run

func (*Consensus_LeaderWithID_Call) RunAndReturn

type Consensus_Leader_Call

type Consensus_Leader_Call struct {
	*mock.Call
}

Consensus_Leader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Leader'

func (*Consensus_Leader_Call) Return

func (*Consensus_Leader_Call) Run

func (_c *Consensus_Leader_Call) Run(run func()) *Consensus_Leader_Call

func (*Consensus_Leader_Call) RunAndReturn

func (_c *Consensus_Leader_Call) RunAndReturn(run func() bool) *Consensus_Leader_Call

type Consensus_RemoveServer_Call

type Consensus_RemoveServer_Call struct {
	*mock.Call
}

Consensus_RemoveServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveServer'

func (*Consensus_RemoveServer_Call) Return

func (*Consensus_RemoveServer_Call) Run

func (*Consensus_RemoveServer_Call) RunAndReturn

type Consensus_ServerID_Call

type Consensus_ServerID_Call struct {
	*mock.Call
}

Consensus_ServerID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ServerID'

func (*Consensus_ServerID_Call) Return

func (*Consensus_ServerID_Call) Run

func (_c *Consensus_ServerID_Call) Run(run func()) *Consensus_ServerID_Call

func (*Consensus_ServerID_Call) RunAndReturn

func (_c *Consensus_ServerID_Call) RunAndReturn(run func() string) *Consensus_ServerID_Call

type Consensus_Shutdown_Call

type Consensus_Shutdown_Call struct {
	*mock.Call
}

Consensus_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'

func (*Consensus_Shutdown_Call) Return

func (*Consensus_Shutdown_Call) Run

func (_c *Consensus_Shutdown_Call) Run(run func()) *Consensus_Shutdown_Call

func (*Consensus_Shutdown_Call) RunAndReturn

func (_c *Consensus_Shutdown_Call) RunAndReturn(run func() error) *Consensus_Shutdown_Call

type Consensus_TransferLeaderTo_Call

type Consensus_TransferLeaderTo_Call struct {
	*mock.Call
}

Consensus_TransferLeaderTo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferLeaderTo'

func (*Consensus_TransferLeaderTo_Call) Return

func (*Consensus_TransferLeaderTo_Call) Run

func (*Consensus_TransferLeaderTo_Call) RunAndReturn

type Consensus_TransferLeader_Call

type Consensus_TransferLeader_Call struct {
	*mock.Call
}

Consensus_TransferLeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TransferLeader'

func (*Consensus_TransferLeader_Call) Return

func (*Consensus_TransferLeader_Call) Run

func (*Consensus_TransferLeader_Call) RunAndReturn

Jump to

Keyboard shortcuts

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