sw_dummy_response_service.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package skywalkingreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver"
  4. import (
  5. "context"
  6. v3c "skywalking.apache.org/repo/goapi/collect/agent/configuration/v3"
  7. common "skywalking.apache.org/repo/goapi/collect/common/v3"
  8. event "skywalking.apache.org/repo/goapi/collect/event/v3"
  9. agent "skywalking.apache.org/repo/goapi/collect/language/agent/v3"
  10. profile "skywalking.apache.org/repo/goapi/collect/language/profile/v3"
  11. management "skywalking.apache.org/repo/goapi/collect/management/v3"
  12. )
  13. type dummyReportService struct {
  14. management.UnimplementedManagementServiceServer
  15. v3c.UnimplementedConfigurationDiscoveryServiceServer
  16. agent.UnimplementedJVMMetricReportServiceServer
  17. profile.UnimplementedProfileTaskServer
  18. agent.UnimplementedBrowserPerfServiceServer
  19. event.UnimplementedEventServiceServer
  20. }
  21. // for sw InstanceProperties
  22. func (d *dummyReportService) ReportInstanceProperties(_ context.Context, _ *management.InstanceProperties) (*common.Commands, error) {
  23. return &common.Commands{}, nil
  24. }
  25. // for sw InstancePingPkg
  26. func (d *dummyReportService) KeepAlive(_ context.Context, _ *management.InstancePingPkg) (*common.Commands, error) {
  27. return &common.Commands{}, nil
  28. }
  29. // for sw JVMMetric
  30. func (d *dummyReportService) Collect(_ context.Context, _ *agent.JVMMetricCollection) (*common.Commands, error) {
  31. return &common.Commands{}, nil
  32. }
  33. // for sw agent cds
  34. func (d *dummyReportService) FetchConfigurations(_ context.Context, _ *v3c.ConfigurationSyncRequest) (*common.Commands, error) {
  35. return &common.Commands{}, nil
  36. }
  37. // for sw profile
  38. func (d *dummyReportService) GetProfileTaskCommands(_ context.Context, _ *profile.ProfileTaskCommandQuery) (*common.Commands, error) {
  39. return &common.Commands{}, nil
  40. }
  41. func (d *dummyReportService) CollectSnapshot(_ profile.ProfileTask_CollectSnapshotServer) error {
  42. return nil
  43. }
  44. func (d *dummyReportService) ReportTaskFinish(_ context.Context, _ *profile.ProfileTaskFinishReport) (*common.Commands, error) {
  45. return &common.Commands{}, nil
  46. }