stats.go 696 B

12345678910111213141516171819202122232425262728
  1. package foodgroup
  2. import (
  3. "context"
  4. "github.com/mk6i/open-oscar-server/wire"
  5. )
  6. func NewStatsService() StatsService {
  7. return StatsService{}
  8. }
  9. type StatsService struct {
  10. }
  11. // ReportEvents handles incoming stats events by acknowledging them without
  12. // processing. This is a no-op implementation to satisfy the client's
  13. // expectation of a response.
  14. func (s StatsService) ReportEvents(ctx context.Context, inFrame wire.SNACFrame, _ wire.SNAC_0x0B_0x03_StatsReportEvents) wire.SNACMessage {
  15. return wire.SNACMessage{
  16. Frame: wire.SNACFrame{
  17. FoodGroup: wire.Stats,
  18. SubGroup: wire.StatsReportAck,
  19. RequestID: inFrame.RequestID,
  20. },
  21. Body: wire.SNAC_0x0B_0x04_StatsReportAck{},
  22. }
  23. }