Documentation ¶
Index ¶
- type Allocator
- type MockAllocator
- type MockAllocator_AllocID_Call
- func (_c *MockAllocator_AllocID_Call) Return(_a0 int64, _a1 error) *MockAllocator_AllocID_Call
- func (_c *MockAllocator_AllocID_Call) Run(run func(_a0 context.Context)) *MockAllocator_AllocID_Call
- func (_c *MockAllocator_AllocID_Call) RunAndReturn(run func(context.Context) (int64, error)) *MockAllocator_AllocID_Call
- type MockAllocator_AllocN_Call
- func (_c *MockAllocator_AllocN_Call) Return(_a0 int64, _a1 int64, _a2 error) *MockAllocator_AllocN_Call
- func (_c *MockAllocator_AllocN_Call) Run(run func(n int64)) *MockAllocator_AllocN_Call
- func (_c *MockAllocator_AllocN_Call) RunAndReturn(run func(int64) (int64, int64, error)) *MockAllocator_AllocN_Call
- type MockAllocator_AllocTimestamp_Call
- func (_c *MockAllocator_AllocTimestamp_Call) Return(_a0 uint64, _a1 error) *MockAllocator_AllocTimestamp_Call
- func (_c *MockAllocator_AllocTimestamp_Call) Run(run func(_a0 context.Context)) *MockAllocator_AllocTimestamp_Call
- func (_c *MockAllocator_AllocTimestamp_Call) RunAndReturn(run func(context.Context) (uint64, error)) *MockAllocator_AllocTimestamp_Call
- type MockAllocator_Expecter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator interface { AllocTimestamp(context.Context) (typeutil.Timestamp, error) AllocID(context.Context) (typeutil.UniqueID, error) AllocN(n int64) (typeutil.UniqueID, typeutil.UniqueID, error) }
Allocator is the interface that allocating `UniqueID` or `Timestamp`
func NewRootCoordAllocator ¶
func NewRootCoordAllocator(rootCoordClient types.RootCoordClient) Allocator
NewRootCoordAllocator gets an allocator from RootCoord
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) AllocID ¶
func (_m *MockAllocator) AllocID(_a0 context.Context) (int64, error)
AllocID provides a mock function with given fields: _a0
func (*MockAllocator) AllocN ¶
func (_m *MockAllocator) AllocN(n int64) (int64, int64, error)
AllocN provides a mock function with given fields: n
func (*MockAllocator) AllocTimestamp ¶
func (_m *MockAllocator) AllocTimestamp(_a0 context.Context) (uint64, error)
AllocTimestamp provides a mock function with given fields: _a0
func (*MockAllocator) EXPECT ¶
func (_m *MockAllocator) EXPECT() *MockAllocator_Expecter
type MockAllocator_AllocID_Call ¶
MockAllocator_AllocID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocID'
func (*MockAllocator_AllocID_Call) Return ¶
func (_c *MockAllocator_AllocID_Call) Return(_a0 int64, _a1 error) *MockAllocator_AllocID_Call
func (*MockAllocator_AllocID_Call) Run ¶
func (_c *MockAllocator_AllocID_Call) Run(run func(_a0 context.Context)) *MockAllocator_AllocID_Call
func (*MockAllocator_AllocID_Call) RunAndReturn ¶
func (_c *MockAllocator_AllocID_Call) RunAndReturn(run func(context.Context) (int64, error)) *MockAllocator_AllocID_Call
type MockAllocator_AllocN_Call ¶
MockAllocator_AllocN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocN'
func (*MockAllocator_AllocN_Call) Return ¶
func (_c *MockAllocator_AllocN_Call) Return(_a0 int64, _a1 int64, _a2 error) *MockAllocator_AllocN_Call
func (*MockAllocator_AllocN_Call) Run ¶
func (_c *MockAllocator_AllocN_Call) Run(run func(n int64)) *MockAllocator_AllocN_Call
func (*MockAllocator_AllocN_Call) RunAndReturn ¶
func (_c *MockAllocator_AllocN_Call) RunAndReturn(run func(int64) (int64, int64, error)) *MockAllocator_AllocN_Call
type MockAllocator_AllocTimestamp_Call ¶
MockAllocator_AllocTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AllocTimestamp'
func (*MockAllocator_AllocTimestamp_Call) Return ¶
func (_c *MockAllocator_AllocTimestamp_Call) Return(_a0 uint64, _a1 error) *MockAllocator_AllocTimestamp_Call
func (*MockAllocator_AllocTimestamp_Call) Run ¶
func (_c *MockAllocator_AllocTimestamp_Call) Run(run func(_a0 context.Context)) *MockAllocator_AllocTimestamp_Call
func (*MockAllocator_AllocTimestamp_Call) RunAndReturn ¶
func (_c *MockAllocator_AllocTimestamp_Call) RunAndReturn(run func(context.Context) (uint64, error)) *MockAllocator_AllocTimestamp_Call
type MockAllocator_Expecter ¶
type MockAllocator_Expecter struct {
// contains filtered or unexported fields
}
func (*MockAllocator_Expecter) AllocID ¶
func (_e *MockAllocator_Expecter) AllocID(_a0 interface{}) *MockAllocator_AllocID_Call
AllocID is a helper method to define mock.On call
- _a0 context.Context
func (*MockAllocator_Expecter) AllocN ¶
func (_e *MockAllocator_Expecter) AllocN(n interface{}) *MockAllocator_AllocN_Call
AllocN is a helper method to define mock.On call
- n int64
func (*MockAllocator_Expecter) AllocTimestamp ¶
func (_e *MockAllocator_Expecter) AllocTimestamp(_a0 interface{}) *MockAllocator_AllocTimestamp_Call
AllocTimestamp is a helper method to define mock.On call
- _a0 context.Context