Documentation ¶
Index ¶
- func Register(container *dig.Container) error
- type CheckPointerDeps
- type CheckPointerModelDeps
- type Commands
- type CommandsDeps
- type GetTopKItemsParams
- type GetTopKItemsResponse
- type ItemEventsAggregatorDeps
- type ItemEventsAggregatorModelDeps
- type MockCommands
- type MockCommands_CreateCheckPoint_Call
- func (_c *MockCommands_CreateCheckPoint_Call) Return(_a0 error) *MockCommands_CreateCheckPoint_Call
- func (_c *MockCommands_CreateCheckPoint_Call) Run(run func(ctx context.Context)) *MockCommands_CreateCheckPoint_Call
- func (_c *MockCommands_CreateCheckPoint_Call) RunAndReturn(run func(context.Context) error) *MockCommands_CreateCheckPoint_Call
- type MockCommands_Expecter
- type MockCommands_StartAggregator_Call
- func (_c *MockCommands_StartAggregator_Call) Return(_a0 error) *MockCommands_StartAggregator_Call
- func (_c *MockCommands_StartAggregator_Call) Run(run func(ctx context.Context)) *MockCommands_StartAggregator_Call
- func (_c *MockCommands_StartAggregator_Call) RunAndReturn(run func(context.Context) error) *MockCommands_StartAggregator_Call
- type MockQueries
- type MockQueries_Expecter
- type MockQueries_GetTopKItems_Call
- func (_c *MockQueries_GetTopKItems_Call) Return(_a0 *GetTopKItemsResponse, _a1 error) *MockQueries_GetTopKItems_Call
- func (_c *MockQueries_GetTopKItems_Call) Run(run func(_a0 context.Context, params GetTopKItemsParams)) *MockQueries_GetTopKItems_Call
- func (_c *MockQueries_GetTopKItems_Call) RunAndReturn(run func(context.Context, GetTopKItemsParams) (*GetTopKItemsResponse, error)) *MockQueries_GetTopKItems_Call
- type Queries
- type QueriesDeps
- type TopKItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckPointerDeps ¶
type CheckPointerModelDeps ¶
type CheckPointerModelDeps struct { dig.In // services blobstorage.Storage }
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
func NewCommands ¶
func NewCommands(deps CommandsDeps) *Commands
type CommandsDeps ¶
type CommandsDeps struct { dig.In RootLogger *slog.Logger // service layer ItemEventsReader itemEventsKafkaReader // package private components ItemEventsAggregator itemEventsAggregator CheckPointer checkPointer CountersFactory countersFactory TopKItemsFactory topKItemsFactory AggregationState aggregationState }
type GetTopKItemsParams ¶
type GetTopKItemsParams struct {
Limit int
}
type GetTopKItemsResponse ¶
type GetTopKItemsResponse struct {
Data []TopKItem `json:"data"`
}
type ItemEventsAggregatorDeps ¶
type ItemEventsAggregatorDeps struct { dig.In RootLogger *slog.Logger // config FlushInterval time.Duration `name:"config.aggregator.flushInterval"` Verbose bool `name:"config.aggregator.verbose"` ItemEventLogRate int64 `name:"config.aggregator.itemEventLogRate"` // service layer TickerFactory func(d time.Duration) *time.Ticker // package private components AggregatorModel itemEventsAggregatorModel }
type MockCommands ¶
MockCommands is an autogenerated mock type for the mockCommands type
func NewMockCommands ¶
func NewMockCommands(t interface { mock.TestingT Cleanup(func()) }) *MockCommands
NewMockCommands creates a new instance of MockCommands. 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 (*MockCommands) CreateCheckPoint ¶
func (_m *MockCommands) CreateCheckPoint(ctx context.Context) error
CreateCheckPoint provides a mock function with given fields: ctx
func (*MockCommands) EXPECT ¶
func (_m *MockCommands) EXPECT() *MockCommands_Expecter
func (*MockCommands) StartAggregator ¶
func (_m *MockCommands) StartAggregator(ctx context.Context) error
StartAggregator provides a mock function with given fields: ctx
type MockCommands_CreateCheckPoint_Call ¶
MockCommands_CreateCheckPoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateCheckPoint'
func (*MockCommands_CreateCheckPoint_Call) Return ¶
func (_c *MockCommands_CreateCheckPoint_Call) Return(_a0 error) *MockCommands_CreateCheckPoint_Call
func (*MockCommands_CreateCheckPoint_Call) Run ¶
func (_c *MockCommands_CreateCheckPoint_Call) Run(run func(ctx context.Context)) *MockCommands_CreateCheckPoint_Call
func (*MockCommands_CreateCheckPoint_Call) RunAndReturn ¶
func (_c *MockCommands_CreateCheckPoint_Call) RunAndReturn(run func(context.Context) error) *MockCommands_CreateCheckPoint_Call
type MockCommands_Expecter ¶
type MockCommands_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCommands_Expecter) CreateCheckPoint ¶
func (_e *MockCommands_Expecter) CreateCheckPoint(ctx interface{}) *MockCommands_CreateCheckPoint_Call
CreateCheckPoint is a helper method to define mock.On call
- ctx context.Context
func (*MockCommands_Expecter) StartAggregator ¶
func (_e *MockCommands_Expecter) StartAggregator(ctx interface{}) *MockCommands_StartAggregator_Call
StartAggregator is a helper method to define mock.On call
- ctx context.Context
type MockCommands_StartAggregator_Call ¶
MockCommands_StartAggregator_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartAggregator'
func (*MockCommands_StartAggregator_Call) Return ¶
func (_c *MockCommands_StartAggregator_Call) Return(_a0 error) *MockCommands_StartAggregator_Call
func (*MockCommands_StartAggregator_Call) Run ¶
func (_c *MockCommands_StartAggregator_Call) Run(run func(ctx context.Context)) *MockCommands_StartAggregator_Call
func (*MockCommands_StartAggregator_Call) RunAndReturn ¶
func (_c *MockCommands_StartAggregator_Call) RunAndReturn(run func(context.Context) error) *MockCommands_StartAggregator_Call
type MockQueries ¶
MockQueries is an autogenerated mock type for the mockQueries type
func NewMockQueries ¶
func NewMockQueries(t interface { mock.TestingT Cleanup(func()) }) *MockQueries
NewMockQueries creates a new instance of MockQueries. 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 (*MockQueries) EXPECT ¶
func (_m *MockQueries) EXPECT() *MockQueries_Expecter
func (*MockQueries) GetTopKItems ¶
func (_m *MockQueries) GetTopKItems(_a0 context.Context, params GetTopKItemsParams) (*GetTopKItemsResponse, error)
GetTopKItems provides a mock function with given fields: _a0, params
type MockQueries_Expecter ¶
type MockQueries_Expecter struct {
// contains filtered or unexported fields
}
func (*MockQueries_Expecter) GetTopKItems ¶
func (_e *MockQueries_Expecter) GetTopKItems(_a0 interface{}, params interface{}) *MockQueries_GetTopKItems_Call
GetTopKItems is a helper method to define mock.On call
- _a0 context.Context
- params GetTopKItemsParams
type MockQueries_GetTopKItems_Call ¶
MockQueries_GetTopKItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTopKItems'
func (*MockQueries_GetTopKItems_Call) Return ¶
func (_c *MockQueries_GetTopKItems_Call) Return(_a0 *GetTopKItemsResponse, _a1 error) *MockQueries_GetTopKItems_Call
func (*MockQueries_GetTopKItems_Call) Run ¶
func (_c *MockQueries_GetTopKItems_Call) Run(run func(_a0 context.Context, params GetTopKItemsParams)) *MockQueries_GetTopKItems_Call
func (*MockQueries_GetTopKItems_Call) RunAndReturn ¶
func (_c *MockQueries_GetTopKItems_Call) RunAndReturn(run func(context.Context, GetTopKItemsParams) (*GetTopKItemsResponse, error)) *MockQueries_GetTopKItems_Call
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func NewQueries ¶
func NewQueries(deps QueriesDeps) *Queries
func (*Queries) GetTopKItems ¶
func (q *Queries) GetTopKItems( _ context.Context, params GetTopKItemsParams, ) (*GetTopKItemsResponse, error)
type QueriesDeps ¶
Source Files ¶
- aggregator.go
- aggregator_model.go
- checkpointer.go
- checkpointer_model.go
- commands.go
- counters.go
- mock_check_pointer.go
- mock_check_pointer_model.go
- mock_commands.go
- mock_counters.go
- mock_counters_factory.go
- mock_item_events_aggregator.go
- mock_item_events_aggregator_model.go
- mock_queries.go
- mock_top_k_items.go
- mock_top_k_items_factory.go
- mocks.go
- queries.go
- register.go
- testing.go
- top_k_items.go