mocks

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DistributedLock

type DistributedLock struct {
	mock.Mock
}

DistributedLock is an autogenerated mock type for the DistributedLock type

func NewDistributedLock

func NewDistributedLock(t mockConstructorTestingTNewDistributedLock) *DistributedLock

NewDistributedLock creates a new instance of DistributedLock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DistributedLock) EXPECT

func (*DistributedLock) Release

func (_m *DistributedLock) Release() error

Release provides a mock function with given fields:

func (*DistributedLock) Renew

func (_m *DistributedLock) Renew(ctx context.Context, lockTime time.Duration) error

Renew provides a mock function with given fields: ctx, lockTime

type DistributedLockProvider

type DistributedLockProvider struct {
	mock.Mock
}

DistributedLockProvider is an autogenerated mock type for the DistributedLockProvider type

func NewDistributedLockProvider

func NewDistributedLockProvider(t mockConstructorTestingTNewDistributedLockProvider) *DistributedLockProvider

NewDistributedLockProvider creates a new instance of DistributedLockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DistributedLockProvider) Acquire

func (_m *DistributedLockProvider) Acquire(ctx context.Context, resource string) (conc.DistributedLock, error)

Acquire provides a mock function with given fields: ctx, resource

func (*DistributedLockProvider) EXPECT

type DistributedLockProvider_Acquire_Call

type DistributedLockProvider_Acquire_Call struct {
	*mock.Call
}

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

func (*DistributedLockProvider_Acquire_Call) Return

func (*DistributedLockProvider_Acquire_Call) Run

func (*DistributedLockProvider_Acquire_Call) RunAndReturn

type DistributedLockProvider_Expecter

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

func (*DistributedLockProvider_Expecter) Acquire

func (_e *DistributedLockProvider_Expecter) Acquire(ctx interface{}, resource interface{}) *DistributedLockProvider_Acquire_Call

Acquire is a helper method to define mock.On call

  • ctx context.Context
  • resource string

type DistributedLock_Expecter

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

func (*DistributedLock_Expecter) Release

Release is a helper method to define mock.On call

func (*DistributedLock_Expecter) Renew

func (_e *DistributedLock_Expecter) Renew(ctx interface{}, lockTime interface{}) *DistributedLock_Renew_Call

Renew is a helper method to define mock.On call

  • ctx context.Context
  • lockTime time.Duration

type DistributedLock_Release_Call

type DistributedLock_Release_Call struct {
	*mock.Call
}

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

func (*DistributedLock_Release_Call) Return

func (*DistributedLock_Release_Call) Run

func (*DistributedLock_Release_Call) RunAndReturn

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

type DistributedLock_Renew_Call

type DistributedLock_Renew_Call struct {
	*mock.Call
}

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

func (*DistributedLock_Renew_Call) Return

func (*DistributedLock_Renew_Call) Run

func (*DistributedLock_Renew_Call) RunAndReturn

type PoisonedLock

type PoisonedLock struct {
	mock.Mock
}

PoisonedLock is an autogenerated mock type for the PoisonedLock type

func NewPoisonedLock

func NewPoisonedLock(t mockConstructorTestingTNewPoisonedLock) *PoisonedLock

NewPoisonedLock creates a new instance of PoisonedLock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PoisonedLock) EXPECT

func (_m *PoisonedLock) EXPECT() *PoisonedLock_Expecter

func (*PoisonedLock) MustLock

func (_m *PoisonedLock) MustLock()

MustLock provides a mock function with given fields:

func (*PoisonedLock) Poison

func (_m *PoisonedLock) Poison() error

Poison provides a mock function with given fields:

func (*PoisonedLock) PoisonIf

func (_m *PoisonedLock) PoisonIf(_a0 func() (bool, error)) error

PoisonIf provides a mock function with given fields: _a0

func (*PoisonedLock) TryLock

func (_m *PoisonedLock) TryLock() error

TryLock provides a mock function with given fields:

func (*PoisonedLock) Unlock

func (_m *PoisonedLock) Unlock()

Unlock provides a mock function with given fields:

type PoisonedLock_Expecter

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

func (*PoisonedLock_Expecter) MustLock

MustLock is a helper method to define mock.On call

func (*PoisonedLock_Expecter) Poison

Poison is a helper method to define mock.On call

func (*PoisonedLock_Expecter) PoisonIf

func (_e *PoisonedLock_Expecter) PoisonIf(_a0 interface{}) *PoisonedLock_PoisonIf_Call

PoisonIf is a helper method to define mock.On call

  • _a0 func()(bool , error)

func (*PoisonedLock_Expecter) TryLock

TryLock is a helper method to define mock.On call

func (*PoisonedLock_Expecter) Unlock

Unlock is a helper method to define mock.On call

type PoisonedLock_MustLock_Call

type PoisonedLock_MustLock_Call struct {
	*mock.Call
}

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

func (*PoisonedLock_MustLock_Call) Return

func (*PoisonedLock_MustLock_Call) Run

func (*PoisonedLock_MustLock_Call) RunAndReturn

func (_c *PoisonedLock_MustLock_Call) RunAndReturn(run func()) *PoisonedLock_MustLock_Call

type PoisonedLock_PoisonIf_Call

type PoisonedLock_PoisonIf_Call struct {
	*mock.Call
}

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

func (*PoisonedLock_PoisonIf_Call) Return

func (*PoisonedLock_PoisonIf_Call) Run

func (_c *PoisonedLock_PoisonIf_Call) Run(run func(_a0 func() (bool, error))) *PoisonedLock_PoisonIf_Call

func (*PoisonedLock_PoisonIf_Call) RunAndReturn

func (_c *PoisonedLock_PoisonIf_Call) RunAndReturn(run func(func() (bool, error)) error) *PoisonedLock_PoisonIf_Call

type PoisonedLock_Poison_Call

type PoisonedLock_Poison_Call struct {
	*mock.Call
}

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

func (*PoisonedLock_Poison_Call) Return

func (*PoisonedLock_Poison_Call) Run

func (*PoisonedLock_Poison_Call) RunAndReturn

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

type PoisonedLock_TryLock_Call

type PoisonedLock_TryLock_Call struct {
	*mock.Call
}

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

func (*PoisonedLock_TryLock_Call) Return

func (*PoisonedLock_TryLock_Call) Run

func (*PoisonedLock_TryLock_Call) RunAndReturn

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

type PoisonedLock_Unlock_Call

type PoisonedLock_Unlock_Call struct {
	*mock.Call
}

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

func (*PoisonedLock_Unlock_Call) Return

func (*PoisonedLock_Unlock_Call) Run

func (*PoisonedLock_Unlock_Call) RunAndReturn

func (_c *PoisonedLock_Unlock_Call) RunAndReturn(run func()) *PoisonedLock_Unlock_Call

type SignalOnce

type SignalOnce struct {
	mock.Mock
}

SignalOnce is an autogenerated mock type for the SignalOnce type

func NewSignalOnce

func NewSignalOnce(t mockConstructorTestingTNewSignalOnce) *SignalOnce

NewSignalOnce creates a new instance of SignalOnce. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SignalOnce) Channel

func (_m *SignalOnce) Channel() chan struct{}

Channel provides a mock function with given fields:

func (*SignalOnce) EXPECT

func (_m *SignalOnce) EXPECT() *SignalOnce_Expecter

func (*SignalOnce) Signal

func (_m *SignalOnce) Signal()

Signal provides a mock function with given fields:

func (*SignalOnce) Signaled

func (_m *SignalOnce) Signaled() bool

Signaled provides a mock function with given fields:

type SignalOnce_Channel_Call

type SignalOnce_Channel_Call struct {
	*mock.Call
}

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

func (*SignalOnce_Channel_Call) Return

func (_c *SignalOnce_Channel_Call) Return(_a0 chan struct{}) *SignalOnce_Channel_Call

func (*SignalOnce_Channel_Call) Run

func (_c *SignalOnce_Channel_Call) Run(run func()) *SignalOnce_Channel_Call

func (*SignalOnce_Channel_Call) RunAndReturn

func (_c *SignalOnce_Channel_Call) RunAndReturn(run func() chan struct{}) *SignalOnce_Channel_Call

type SignalOnce_Expecter

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

func (*SignalOnce_Expecter) Channel

Channel is a helper method to define mock.On call

func (*SignalOnce_Expecter) Signal

Signal is a helper method to define mock.On call

func (*SignalOnce_Expecter) Signaled

Signaled is a helper method to define mock.On call

type SignalOnce_Signal_Call

type SignalOnce_Signal_Call struct {
	*mock.Call
}

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

func (*SignalOnce_Signal_Call) Return

func (*SignalOnce_Signal_Call) Run

func (_c *SignalOnce_Signal_Call) Run(run func()) *SignalOnce_Signal_Call

func (*SignalOnce_Signal_Call) RunAndReturn

func (_c *SignalOnce_Signal_Call) RunAndReturn(run func()) *SignalOnce_Signal_Call

type SignalOnce_Signaled_Call

type SignalOnce_Signaled_Call struct {
	*mock.Call
}

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

func (*SignalOnce_Signaled_Call) Return

func (*SignalOnce_Signaled_Call) Run

func (*SignalOnce_Signaled_Call) RunAndReturn

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

Jump to

Keyboard shortcuts

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