mocks

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 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 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

type LockManager added in v0.35.0

type LockManager struct {
	mock.Mock
}

LockManager is an autogenerated mock type for the LockManager type

func NewLockManager added in v0.35.0

func NewLockManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *LockManager

NewLockManager creates a new instance of LockManager. 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 (*LockManager) EXPECT added in v0.35.0

func (_m *LockManager) EXPECT() *LockManager_Expecter

func (*LockManager) ReleaseLock added in v0.35.0

func (_m *LockManager) ReleaseLock(ctx context.Context, resource string, token string) error

ReleaseLock provides a mock function with given fields: ctx, resource, token

func (*LockManager) RenewLock added in v0.35.0

func (_m *LockManager) RenewLock(ctx context.Context, lockTime time.Duration, resource string, token string) error

RenewLock provides a mock function with given fields: ctx, lockTime, resource, token

type LockManager_Expecter added in v0.35.0

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

func (*LockManager_Expecter) ReleaseLock added in v0.35.0

func (_e *LockManager_Expecter) ReleaseLock(ctx interface{}, resource interface{}, token interface{}) *LockManager_ReleaseLock_Call

ReleaseLock is a helper method to define mock.On call

  • ctx context.Context
  • resource string
  • token string

func (*LockManager_Expecter) RenewLock added in v0.35.0

func (_e *LockManager_Expecter) RenewLock(ctx interface{}, lockTime interface{}, resource interface{}, token interface{}) *LockManager_RenewLock_Call

RenewLock is a helper method to define mock.On call

  • ctx context.Context
  • lockTime time.Duration
  • resource string
  • token string

type LockManager_ReleaseLock_Call added in v0.35.0

type LockManager_ReleaseLock_Call struct {
	*mock.Call
}

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

func (*LockManager_ReleaseLock_Call) Return added in v0.35.0

func (*LockManager_ReleaseLock_Call) Run added in v0.35.0

func (_c *LockManager_ReleaseLock_Call) Run(run func(ctx context.Context, resource string, token string)) *LockManager_ReleaseLock_Call

func (*LockManager_ReleaseLock_Call) RunAndReturn added in v0.35.0

type LockManager_RenewLock_Call added in v0.35.0

type LockManager_RenewLock_Call struct {
	*mock.Call
}

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

func (*LockManager_RenewLock_Call) Return added in v0.35.0

func (*LockManager_RenewLock_Call) Run added in v0.35.0

func (_c *LockManager_RenewLock_Call) Run(run func(ctx context.Context, lockTime time.Duration, resource string, token string)) *LockManager_RenewLock_Call

func (*LockManager_RenewLock_Call) RunAndReturn added in v0.35.0

Jump to

Keyboard shortcuts

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