forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw_dummy_response_service.go
57 lines (46 loc) · 2.08 KB
/
sw_dummy_response_service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package skywalkingreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/skywalkingreceiver"
import (
"context"
v3c "skywalking.apache.org/repo/goapi/collect/agent/configuration/v3"
common "skywalking.apache.org/repo/goapi/collect/common/v3"
event "skywalking.apache.org/repo/goapi/collect/event/v3"
agent "skywalking.apache.org/repo/goapi/collect/language/agent/v3"
profile "skywalking.apache.org/repo/goapi/collect/language/profile/v3"
management "skywalking.apache.org/repo/goapi/collect/management/v3"
)
type dummyReportService struct {
management.UnimplementedManagementServiceServer
v3c.UnimplementedConfigurationDiscoveryServiceServer
agent.UnimplementedJVMMetricReportServiceServer
profile.UnimplementedProfileTaskServer
agent.UnimplementedBrowserPerfServiceServer
event.UnimplementedEventServiceServer
}
// for sw InstanceProperties
func (d *dummyReportService) ReportInstanceProperties(_ context.Context, _ *management.InstanceProperties) (*common.Commands, error) {
return &common.Commands{}, nil
}
// for sw InstancePingPkg
func (d *dummyReportService) KeepAlive(_ context.Context, _ *management.InstancePingPkg) (*common.Commands, error) {
return &common.Commands{}, nil
}
// for sw JVMMetric
func (d *dummyReportService) Collect(_ context.Context, _ *agent.JVMMetricCollection) (*common.Commands, error) {
return &common.Commands{}, nil
}
// for sw agent cds
func (d *dummyReportService) FetchConfigurations(_ context.Context, _ *v3c.ConfigurationSyncRequest) (*common.Commands, error) {
return &common.Commands{}, nil
}
// for sw profile
func (d *dummyReportService) GetProfileTaskCommands(_ context.Context, _ *profile.ProfileTaskCommandQuery) (*common.Commands, error) {
return &common.Commands{}, nil
}
func (d *dummyReportService) CollectSnapshot(_ profile.ProfileTask_CollectSnapshotServer) error {
return nil
}
func (d *dummyReportService) ReportTaskFinish(_ context.Context, _ *profile.ProfileTaskFinishReport) (*common.Commands, error) {
return &common.Commands{}, nil
}