-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathBUILD.bazel
More file actions
140 lines (137 loc) · 4.76 KB
/
Copy pathBUILD.bazel
File metadata and controls
140 lines (137 loc) · 4.76 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
load("@rules_go//go:def.bzl", "go_library")
load("//bazel/rules/go:dd_agent_go_test.bzl", "dd_agent_go_test")
go_library(
name = "coat",
srcs = [
"client.go",
"client_grpc.go",
"client_grpc_unix.go",
"client_grpc_windows.go",
"collector.go",
"collector_linux.go",
"collector_other.go",
"collector_windows.go",
"paths_notwindows.go",
"paths_windows.go",
"reporter.go",
"services.go",
"snapshot.go",
],
importpath = "github.com/DataDog/datadog-agent/pkg/procmgr/coat",
visibility = ["//visibility:public"],
deps = [
"//comp/core/telemetry/def",
"//pkg/proto/pbgo/procmgr",
"//pkg/util/log",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//status",
] + select({
"@rules_go//go/platform:aix": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:android": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:darwin": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:dragonfly": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:freebsd": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:illumos": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:ios": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:js": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:linux": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:netbsd": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:openbsd": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:osx": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:plan9": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:qnx": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:solaris": [
"//pkg/util/defaultpaths",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
],
"@rules_go//go/platform:windows": [
"//pkg/util/defaultpaths",
"//pkg/util/winutil",
"@com_github_microsoft_go_winio//:go-winio",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//credentials/insecure",
"@org_golang_x_sys//windows",
],
"//conditions:default": [],
}),
)
dd_agent_go_test(
name = "coat_test",
# keep: split from coat_linux_test.
srcs = ["services_test.go"],
embed = [":coat"],
# keep: procmgr dep is in coat_linux_test only.
deps = [
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)
dd_agent_go_test(
name = "coat_linux_test",
# keep: split from coat_test.
srcs = ["collector_test.go"],
embed = [":coat"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//pkg/proto/pbgo/procmgr",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)