Documentation ¶
Index ¶
- type DistributedLock
- type DistributedLockProvider
- type DistributedLockProvider_Acquire_Call
- func (_c *DistributedLockProvider_Acquire_Call) Return(_a0 conc.DistributedLock, _a1 error) *DistributedLockProvider_Acquire_Call
- func (_c *DistributedLockProvider_Acquire_Call) Run(run func(ctx context.Context, resource string)) *DistributedLockProvider_Acquire_Call
- func (_c *DistributedLockProvider_Acquire_Call) RunAndReturn(run func(context.Context, string) (conc.DistributedLock, error)) *DistributedLockProvider_Acquire_Call
- type DistributedLockProvider_Expecter
- type DistributedLock_Expecter
- type DistributedLock_Release_Call
- type DistributedLock_Renew_Call
- func (_c *DistributedLock_Renew_Call) Return(_a0 error) *DistributedLock_Renew_Call
- func (_c *DistributedLock_Renew_Call) Run(run func(ctx context.Context, lockTime time.Duration)) *DistributedLock_Renew_Call
- func (_c *DistributedLock_Renew_Call) RunAndReturn(run func(context.Context, time.Duration) error) *DistributedLock_Renew_Call
- type PoisonedLock
- type PoisonedLock_Expecter
- func (_e *PoisonedLock_Expecter) MustLock() *PoisonedLock_MustLock_Call
- func (_e *PoisonedLock_Expecter) Poison() *PoisonedLock_Poison_Call
- func (_e *PoisonedLock_Expecter) PoisonIf(_a0 interface{}) *PoisonedLock_PoisonIf_Call
- func (_e *PoisonedLock_Expecter) TryLock() *PoisonedLock_TryLock_Call
- func (_e *PoisonedLock_Expecter) Unlock() *PoisonedLock_Unlock_Call
- type PoisonedLock_MustLock_Call
- type PoisonedLock_PoisonIf_Call
- func (_c *PoisonedLock_PoisonIf_Call) Return(_a0 error) *PoisonedLock_PoisonIf_Call
- func (_c *PoisonedLock_PoisonIf_Call) Run(run func(_a0 func() (bool, error))) *PoisonedLock_PoisonIf_Call
- func (_c *PoisonedLock_PoisonIf_Call) RunAndReturn(run func(func() (bool, error)) error) *PoisonedLock_PoisonIf_Call
- type PoisonedLock_Poison_Call
- type PoisonedLock_TryLock_Call
- type PoisonedLock_Unlock_Call
- type SignalOnce
- type SignalOnce_Channel_Call
- type SignalOnce_Expecter
- type SignalOnce_Signal_Call
- type SignalOnce_Signaled_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributedLock ¶
DistributedLock is an autogenerated mock type for the DistributedLock type
func NewDistributedLock ¶
func NewDistributedLock(t interface { mock.TestingT Cleanup(func()) }) *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. The first argument is typically a *testing.T value.
func (*DistributedLock) EXPECT ¶
func (_m *DistributedLock) EXPECT() *DistributedLock_Expecter
func (*DistributedLock) Release ¶
func (_m *DistributedLock) Release() error
Release provides a mock function with given fields:
type DistributedLockProvider ¶
DistributedLockProvider is an autogenerated mock type for the DistributedLockProvider type
func NewDistributedLockProvider ¶
func NewDistributedLockProvider(t interface { mock.TestingT Cleanup(func()) }) *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. The first argument is typically a *testing.T value.
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 ¶
func (_m *DistributedLockProvider) EXPECT() *DistributedLockProvider_Expecter
type DistributedLockProvider_Acquire_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 (_c *DistributedLockProvider_Acquire_Call) Return(_a0 conc.DistributedLock, _a1 error) *DistributedLockProvider_Acquire_Call
func (*DistributedLockProvider_Acquire_Call) Run ¶
func (_c *DistributedLockProvider_Acquire_Call) Run(run func(ctx context.Context, resource string)) *DistributedLockProvider_Acquire_Call
func (*DistributedLockProvider_Acquire_Call) RunAndReturn ¶
func (_c *DistributedLockProvider_Acquire_Call) RunAndReturn(run func(context.Context, string) (conc.DistributedLock, error)) *DistributedLockProvider_Acquire_Call
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 ¶
func (_e *DistributedLock_Expecter) Release() *DistributedLock_Release_Call
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 ¶
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 (_c *DistributedLock_Release_Call) Return(_a0 error) *DistributedLock_Release_Call
func (*DistributedLock_Release_Call) Run ¶
func (_c *DistributedLock_Release_Call) Run(run func()) *DistributedLock_Release_Call
func (*DistributedLock_Release_Call) RunAndReturn ¶
func (_c *DistributedLock_Release_Call) RunAndReturn(run func() error) *DistributedLock_Release_Call
type DistributedLock_Renew_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 (_c *DistributedLock_Renew_Call) Return(_a0 error) *DistributedLock_Renew_Call
func (*DistributedLock_Renew_Call) Run ¶
func (_c *DistributedLock_Renew_Call) Run(run func(ctx context.Context, lockTime time.Duration)) *DistributedLock_Renew_Call
func (*DistributedLock_Renew_Call) RunAndReturn ¶
func (_c *DistributedLock_Renew_Call) RunAndReturn(run func(context.Context, time.Duration) error) *DistributedLock_Renew_Call
type PoisonedLock ¶
PoisonedLock is an autogenerated mock type for the PoisonedLock type
func NewPoisonedLock ¶
func NewPoisonedLock(t interface { mock.TestingT Cleanup(func()) }) *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. The first argument is typically a *testing.T value.
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 ¶
func (_e *PoisonedLock_Expecter) MustLock() *PoisonedLock_MustLock_Call
MustLock is a helper method to define mock.On call
func (*PoisonedLock_Expecter) Poison ¶
func (_e *PoisonedLock_Expecter) Poison() *PoisonedLock_Poison_Call
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 ¶
func (_e *PoisonedLock_Expecter) TryLock() *PoisonedLock_TryLock_Call
TryLock is a helper method to define mock.On call
func (*PoisonedLock_Expecter) Unlock ¶
func (_e *PoisonedLock_Expecter) Unlock() *PoisonedLock_Unlock_Call
Unlock is a helper method to define mock.On call
type PoisonedLock_MustLock_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 (_c *PoisonedLock_MustLock_Call) Return() *PoisonedLock_MustLock_Call
func (*PoisonedLock_MustLock_Call) Run ¶
func (_c *PoisonedLock_MustLock_Call) Run(run func()) *PoisonedLock_MustLock_Call
func (*PoisonedLock_MustLock_Call) RunAndReturn ¶
func (_c *PoisonedLock_MustLock_Call) RunAndReturn(run func()) *PoisonedLock_MustLock_Call
type PoisonedLock_PoisonIf_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 (_c *PoisonedLock_PoisonIf_Call) Return(_a0 error) *PoisonedLock_PoisonIf_Call
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 ¶
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 (_c *PoisonedLock_Poison_Call) Return(_a0 error) *PoisonedLock_Poison_Call
func (*PoisonedLock_Poison_Call) Run ¶
func (_c *PoisonedLock_Poison_Call) Run(run func()) *PoisonedLock_Poison_Call
func (*PoisonedLock_Poison_Call) RunAndReturn ¶
func (_c *PoisonedLock_Poison_Call) RunAndReturn(run func() error) *PoisonedLock_Poison_Call
type PoisonedLock_TryLock_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 (_c *PoisonedLock_TryLock_Call) Return(_a0 error) *PoisonedLock_TryLock_Call
func (*PoisonedLock_TryLock_Call) Run ¶
func (_c *PoisonedLock_TryLock_Call) Run(run func()) *PoisonedLock_TryLock_Call
func (*PoisonedLock_TryLock_Call) RunAndReturn ¶
func (_c *PoisonedLock_TryLock_Call) RunAndReturn(run func() error) *PoisonedLock_TryLock_Call
type PoisonedLock_Unlock_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 (_c *PoisonedLock_Unlock_Call) Return() *PoisonedLock_Unlock_Call
func (*PoisonedLock_Unlock_Call) Run ¶
func (_c *PoisonedLock_Unlock_Call) Run(run func()) *PoisonedLock_Unlock_Call
func (*PoisonedLock_Unlock_Call) RunAndReturn ¶
func (_c *PoisonedLock_Unlock_Call) RunAndReturn(run func()) *PoisonedLock_Unlock_Call
type SignalOnce ¶
SignalOnce is an autogenerated mock type for the SignalOnce type
func NewSignalOnce ¶
func NewSignalOnce(t interface { mock.TestingT Cleanup(func()) }) *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. The first argument is typically a *testing.T value.
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 ¶
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 ¶
func (_e *SignalOnce_Expecter) Channel() *SignalOnce_Channel_Call
Channel is a helper method to define mock.On call
func (*SignalOnce_Expecter) Signal ¶
func (_e *SignalOnce_Expecter) Signal() *SignalOnce_Signal_Call
Signal is a helper method to define mock.On call
func (*SignalOnce_Expecter) Signaled ¶
func (_e *SignalOnce_Expecter) Signaled() *SignalOnce_Signaled_Call
Signaled is a helper method to define mock.On call
type SignalOnce_Signal_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 (_c *SignalOnce_Signal_Call) Return() *SignalOnce_Signal_Call
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 ¶
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 (_c *SignalOnce_Signaled_Call) Return(_a0 bool) *SignalOnce_Signaled_Call
func (*SignalOnce_Signaled_Call) Run ¶
func (_c *SignalOnce_Signaled_Call) Run(run func()) *SignalOnce_Signaled_Call
func (*SignalOnce_Signaled_Call) RunAndReturn ¶
func (_c *SignalOnce_Signaled_Call) RunAndReturn(run func() bool) *SignalOnce_Signaled_Call