Documentation ¶
Index ¶
- type Allocator
- type Impl
- type MockAllocator
- func (_m *MockAllocator) Alloc(count uint32) (int64, int64, error)
- func (_m *MockAllocator) AllocOne() (int64, error)
- func (_m *MockAllocator) Close()
- func (_m *MockAllocator) EXPECT() *MockAllocator_Expecter
- func (_m *MockAllocator) GetGenerator(count int, done <-chan struct{}) (<-chan int64, error)
- func (_m *MockAllocator) GetIDAlloactor() *internalallocator.IDAllocator
- func (_m *MockAllocator) Start() error
- type MockAllocator_AllocOne_Call
- type MockAllocator_Alloc_Call
- func (_c *MockAllocator_Alloc_Call) Return(_a0 int64, _a1 int64, _a2 error) *MockAllocator_Alloc_Call
- func (_c *MockAllocator_Alloc_Call) Run(run func(count uint32)) *MockAllocator_Alloc_Call
- func (_c *MockAllocator_Alloc_Call) RunAndReturn(run func(uint32) (int64, int64, error)) *MockAllocator_Alloc_Call
- type MockAllocator_Close_Call
- type MockAllocator_Expecter
- func (_e *MockAllocator_Expecter) Alloc(count interface{}) *MockAllocator_Alloc_Call
- func (_e *MockAllocator_Expecter) AllocOne() *MockAllocator_AllocOne_Call
- func (_e *MockAllocator_Expecter) Close() *MockAllocator_Close_Call
- func (_e *MockAllocator_Expecter) GetGenerator(count interface{}, done interface{}) *MockAllocator_GetGenerator_Call
- func (_e *MockAllocator_Expecter) GetIDAlloactor() *MockAllocator_GetIDAlloactor_Call
- func (_e *MockAllocator_Expecter) Start() *MockAllocator_Start_Call
- type MockAllocator_GetGenerator_Call
- func (_c *MockAllocator_GetGenerator_Call) Return(_a0 <-chan int64, _a1 error) *MockAllocator_GetGenerator_Call
- func (_c *MockAllocator_GetGenerator_Call) Run(run func(count int, done <-chan struct{})) *MockAllocator_GetGenerator_Call
- func (_c *MockAllocator_GetGenerator_Call) RunAndReturn(run func(int, <-chan struct{}) (<-chan int64, error)) *MockAllocator_GetGenerator_Call
- type MockAllocator_GetIDAlloactor_Call
- func (_c *MockAllocator_GetIDAlloactor_Call) Return(_a0 *internalallocator.IDAllocator) *MockAllocator_GetIDAlloactor_Call
- func (_c *MockAllocator_GetIDAlloactor_Call) Run(run func()) *MockAllocator_GetIDAlloactor_Call
- func (_c *MockAllocator_GetIDAlloactor_Call) RunAndReturn(run func() *internalallocator.IDAllocator) *MockAllocator_GetIDAlloactor_Call
- type MockAllocator_Start_Call
- type UniqueID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Impl ¶
type Impl struct { // Start() error // Close() error // AllocOne() (UniqueID, error) // Alloc(count uint32) (UniqueID, UniqueID, error) *gAllocator.IDAllocator }
func (*Impl) GetGenerator ¶
func (*Impl) GetIDAlloactor ¶
func (a *Impl) GetIDAlloactor() *gAllocator.IDAllocator
type MockAllocator ¶
MockAllocator is an autogenerated mock type for the Allocator type
func NewMockAllocator ¶
func NewMockAllocator(t interface { mock.TestingT Cleanup(func()) }) *MockAllocator
NewMockAllocator creates a new instance of MockAllocator. 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 (*MockAllocator) Alloc ¶
func (_m *MockAllocator) Alloc(count uint32) (int64, int64, error)
Alloc provides a mock function with given fields: count
func (*MockAllocator) AllocOne ¶
func (_m *MockAllocator) AllocOne() (int64, error)
AllocOne provides a mock function with given fields:
func (*MockAllocator) Close ¶
func (_m *MockAllocator) Close()
Close provides a mock function with given fields:
func (*MockAllocator) EXPECT ¶
func (_m *MockAllocator) EXPECT() *MockAllocator_Expecter
func (*MockAllocator) GetGenerator ¶
func (_m *MockAllocator) GetGenerator(count int, done <-chan struct{}) (<-chan int64, error)
GetGenerator provides a mock function with given fields: count, done
func (*MockAllocator) GetIDAlloactor ¶
func (_m *MockAllocator) GetIDAlloactor() *internalallocator.IDAllocator
GetIDAlloactor provides a mock function with given fields:
func (*MockAllocator) Start ¶
func (_m *MockAllocator) Start() error
Start provides a mock function with given fields:
type MockAllocator_AllocOne_Call ¶
MockAllocator_AllocOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocOne'
func (*MockAllocator_AllocOne_Call) Return ¶
func (_c *MockAllocator_AllocOne_Call) Return(_a0 int64, _a1 error) *MockAllocator_AllocOne_Call
func (*MockAllocator_AllocOne_Call) Run ¶
func (_c *MockAllocator_AllocOne_Call) Run(run func()) *MockAllocator_AllocOne_Call
func (*MockAllocator_AllocOne_Call) RunAndReturn ¶
func (_c *MockAllocator_AllocOne_Call) RunAndReturn(run func() (int64, error)) *MockAllocator_AllocOne_Call
type MockAllocator_Alloc_Call ¶
MockAllocator_Alloc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Alloc'
func (*MockAllocator_Alloc_Call) Return ¶
func (_c *MockAllocator_Alloc_Call) Return(_a0 int64, _a1 int64, _a2 error) *MockAllocator_Alloc_Call
func (*MockAllocator_Alloc_Call) Run ¶
func (_c *MockAllocator_Alloc_Call) Run(run func(count uint32)) *MockAllocator_Alloc_Call
func (*MockAllocator_Alloc_Call) RunAndReturn ¶
func (_c *MockAllocator_Alloc_Call) RunAndReturn(run func(uint32) (int64, int64, error)) *MockAllocator_Alloc_Call
type MockAllocator_Close_Call ¶
MockAllocator_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockAllocator_Close_Call) Return ¶
func (_c *MockAllocator_Close_Call) Return() *MockAllocator_Close_Call
func (*MockAllocator_Close_Call) Run ¶
func (_c *MockAllocator_Close_Call) Run(run func()) *MockAllocator_Close_Call
func (*MockAllocator_Close_Call) RunAndReturn ¶
func (_c *MockAllocator_Close_Call) RunAndReturn(run func()) *MockAllocator_Close_Call
type MockAllocator_Expecter ¶
type MockAllocator_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAllocator_Expecter) Alloc ¶
func (_e *MockAllocator_Expecter) Alloc(count interface{}) *MockAllocator_Alloc_Call
Alloc is a helper method to define mock.On call
- count uint32
func (*MockAllocator_Expecter) AllocOne ¶
func (_e *MockAllocator_Expecter) AllocOne() *MockAllocator_AllocOne_Call
AllocOne is a helper method to define mock.On call
func (*MockAllocator_Expecter) Close ¶
func (_e *MockAllocator_Expecter) Close() *MockAllocator_Close_Call
Close is a helper method to define mock.On call
func (*MockAllocator_Expecter) GetGenerator ¶
func (_e *MockAllocator_Expecter) GetGenerator(count interface{}, done interface{}) *MockAllocator_GetGenerator_Call
GetGenerator is a helper method to define mock.On call
- count int
- done <-chan struct{}
func (*MockAllocator_Expecter) GetIDAlloactor ¶
func (_e *MockAllocator_Expecter) GetIDAlloactor() *MockAllocator_GetIDAlloactor_Call
GetIDAlloactor is a helper method to define mock.On call
func (*MockAllocator_Expecter) Start ¶
func (_e *MockAllocator_Expecter) Start() *MockAllocator_Start_Call
Start is a helper method to define mock.On call
type MockAllocator_GetGenerator_Call ¶
MockAllocator_GetGenerator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetGenerator'
func (*MockAllocator_GetGenerator_Call) Return ¶
func (_c *MockAllocator_GetGenerator_Call) Return(_a0 <-chan int64, _a1 error) *MockAllocator_GetGenerator_Call
func (*MockAllocator_GetGenerator_Call) Run ¶
func (_c *MockAllocator_GetGenerator_Call) Run(run func(count int, done <-chan struct{})) *MockAllocator_GetGenerator_Call
func (*MockAllocator_GetGenerator_Call) RunAndReturn ¶
func (_c *MockAllocator_GetGenerator_Call) RunAndReturn(run func(int, <-chan struct{}) (<-chan int64, error)) *MockAllocator_GetGenerator_Call
type MockAllocator_GetIDAlloactor_Call ¶
MockAllocator_GetIDAlloactor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIDAlloactor'
func (*MockAllocator_GetIDAlloactor_Call) Return ¶
func (_c *MockAllocator_GetIDAlloactor_Call) Return(_a0 *internalallocator.IDAllocator) *MockAllocator_GetIDAlloactor_Call
func (*MockAllocator_GetIDAlloactor_Call) Run ¶
func (_c *MockAllocator_GetIDAlloactor_Call) Run(run func()) *MockAllocator_GetIDAlloactor_Call
func (*MockAllocator_GetIDAlloactor_Call) RunAndReturn ¶
func (_c *MockAllocator_GetIDAlloactor_Call) RunAndReturn(run func() *internalallocator.IDAllocator) *MockAllocator_GetIDAlloactor_Call
type MockAllocator_Start_Call ¶
MockAllocator_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockAllocator_Start_Call) Return ¶
func (_c *MockAllocator_Start_Call) Return(_a0 error) *MockAllocator_Start_Call
func (*MockAllocator_Start_Call) Run ¶
func (_c *MockAllocator_Start_Call) Run(run func()) *MockAllocator_Start_Call
func (*MockAllocator_Start_Call) RunAndReturn ¶
func (_c *MockAllocator_Start_Call) RunAndReturn(run func() error) *MockAllocator_Start_Call