Documentation
¶
Index ¶
- Constants
- type MockService
- type MockService_Expecter
- type MockService_SetShardConcurrency_Call
- func (_c *MockService_SetShardConcurrency_Call) Return() *MockService_SetShardConcurrency_Call
- func (_c *MockService_SetShardConcurrency_Call) Run(run func(concurrency int)) *MockService_SetShardConcurrency_Call
- func (_c *MockService_SetShardConcurrency_Call) RunAndReturn(run func(int)) *MockService_SetShardConcurrency_Call
- type MockService_Usage_Call
- func (_c *MockService_Usage_Call) Return(_a0 *types.Report, _a1 error) *MockService_Usage_Call
- func (_c *MockService_Usage_Call) Run(run func(ctx context.Context, exactObjectCount bool)) *MockService_Usage_Call
- func (_c *MockService_Usage_Call) RunAndReturn(run func(context.Context, bool) (*types.Report, error)) *MockService_Usage_Call
- type Service
Constants ¶
const DefaultShardConcurrency = 1
DefaultShardConcurrency is the default number of shards processed concurrently while collecting usage.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface {
mock.TestingT
Cleanup(func())
}) *MockService
NewMockService creates a new instance of MockService. 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 (*MockService) EXPECT ¶
func (_m *MockService) EXPECT() *MockService_Expecter
func (*MockService) SetShardConcurrency ¶ added in v1.36.21
func (_m *MockService) SetShardConcurrency(concurrency int)
SetShardConcurrency provides a mock function with given fields: concurrency
type MockService_Expecter ¶
type MockService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockService_Expecter) SetShardConcurrency ¶ added in v1.36.21
func (_e *MockService_Expecter) SetShardConcurrency(concurrency interface{}) *MockService_SetShardConcurrency_Call
SetShardConcurrency is a helper method to define mock.On call
- concurrency int
func (*MockService_Expecter) Usage ¶
func (_e *MockService_Expecter) Usage(ctx interface{}, exactObjectCount interface{}) *MockService_Usage_Call
Usage is a helper method to define mock.On call
- ctx context.Context
- exactObjectCount bool
type MockService_SetShardConcurrency_Call ¶ added in v1.36.21
MockService_SetShardConcurrency_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetShardConcurrency'
func (*MockService_SetShardConcurrency_Call) Return ¶ added in v1.36.21
func (_c *MockService_SetShardConcurrency_Call) Return() *MockService_SetShardConcurrency_Call
func (*MockService_SetShardConcurrency_Call) Run ¶ added in v1.36.21
func (_c *MockService_SetShardConcurrency_Call) Run(run func(concurrency int)) *MockService_SetShardConcurrency_Call
func (*MockService_SetShardConcurrency_Call) RunAndReturn ¶ added in v1.36.21
func (_c *MockService_SetShardConcurrency_Call) RunAndReturn(run func(int)) *MockService_SetShardConcurrency_Call
type MockService_Usage_Call ¶
MockService_Usage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Usage'
func (*MockService_Usage_Call) Return ¶
func (_c *MockService_Usage_Call) Return(_a0 *types.Report, _a1 error) *MockService_Usage_Call
func (*MockService_Usage_Call) Run ¶
func (_c *MockService_Usage_Call) Run(run func(ctx context.Context, exactObjectCount bool)) *MockService_Usage_Call
func (*MockService_Usage_Call) RunAndReturn ¶
func (_c *MockService_Usage_Call) RunAndReturn(run func(context.Context, bool) (*types.Report, error)) *MockService_Usage_Call
type Service ¶
type Service interface {
SetShardConcurrency(concurrency int)
Usage(ctx context.Context, exactObjectCount bool) (*types.Report, error)
}
func NewService ¶
func NewService(schemaManager schema.SchemaGetter, db *db.DB, backups backup.BackupBackendProvider, logger logrus.FieldLogger) Service
db db.IndexGetter