mocks

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LeaderElection

type LeaderElection struct {
	mock.Mock
}

LeaderElection is an autogenerated mock type for the LeaderElection type

func NewLeaderElection

func NewLeaderElection(t interface {
	mock.TestingT
	Cleanup(func())
}) *LeaderElection

NewLeaderElection creates a new instance of LeaderElection. 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 (*LeaderElection) EXPECT

func (*LeaderElection) IsLeader

func (_m *LeaderElection) IsLeader(ctx context.Context, memberId string) (bool, error)

IsLeader provides a mock function with given fields: ctx, memberId

func (*LeaderElection) Resign

func (_m *LeaderElection) Resign(ctx context.Context, memberId string) error

Resign provides a mock function with given fields: ctx, memberId

type LeaderElection_Expecter

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

func (*LeaderElection_Expecter) IsLeader

func (_e *LeaderElection_Expecter) IsLeader(ctx interface{}, memberId interface{}) *LeaderElection_IsLeader_Call

IsLeader is a helper method to define mock.On call

  • ctx context.Context
  • memberId string

func (*LeaderElection_Expecter) Resign

func (_e *LeaderElection_Expecter) Resign(ctx interface{}, memberId interface{}) *LeaderElection_Resign_Call

Resign is a helper method to define mock.On call

  • ctx context.Context
  • memberId string

type LeaderElection_IsLeader_Call

type LeaderElection_IsLeader_Call struct {
	*mock.Call
}

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

func (*LeaderElection_IsLeader_Call) Return

func (*LeaderElection_IsLeader_Call) Run

func (*LeaderElection_IsLeader_Call) RunAndReturn

type LeaderElection_Resign_Call

type LeaderElection_Resign_Call struct {
	*mock.Call
}

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

func (*LeaderElection_Resign_Call) Return

func (*LeaderElection_Resign_Call) Run

func (*LeaderElection_Resign_Call) RunAndReturn

Jump to

Keyboard shortcuts

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