You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/config.go
+20-1Lines changed: 20 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ type Region string
25
25
const (
26
26
USRegionRegion="us"
27
27
EURegionRegion="eu"
28
+
JPRegionRegion="jp"
28
29
NoRegionRegion="none"
29
30
)
30
31
@@ -162,6 +163,15 @@ var USHaberdasherURL string
162
163
// EUHaberdasherURL is the base url for the Haberdasher service in the EU
163
164
varEUHaberdasherURLstring
164
165
166
+
// JPUsageEndpoint is the haberdasher endpoint to which usage statistics are sent for JP accounts
167
+
varJPUsageEndpointstring
168
+
169
+
// JPAttachmentEndpoint is the haberdasher endpoint to which attachments are sent for JP accounts
170
+
varJPAttachmentEndpointstring
171
+
172
+
// JPHaberdasherURL is the base url for the Haberdasher service in JP
173
+
varJPHaberdasherURLstring
174
+
165
175
// HaberdasherURL is the base url for the Haberdasher service
166
176
varHaberdasherURLstring
167
177
@@ -231,7 +241,7 @@ func ParseFlags() {
231
241
flag.StringVar(&Flags.Include, "include", defaultString, "Include a file or directory (including subdirectories) in the nrdiag-output.zip. Limit 4GB. To upload the results to New Relic also use the '-a' flag.")
232
242
233
243
flag.StringVar(&Flags.Region, "r", defaultString, "alias for -region")
234
-
flag.StringVar(&Flags.Region, "region", defaultString, "The region your New Relic account is in. Accepted values: EU or US. Case insensitive. (Default: US)")
244
+
flag.StringVar(&Flags.Region, "region", defaultString, "The region your New Relic account is in. Accepted values: EU, JP, or US. Case insensitive. (Default: US)")
235
245
236
246
flag.BoolVar(&Flags.ListScripts, "list-scripts", false, "List available scripts")
237
247
@@ -276,6 +286,12 @@ func ParseFlags() {
276
286
AttachmentEndpoint=EUAttachmentEndpoint
277
287
}
278
288
HaberdasherURL=EUHaberdasherURL
289
+
caseJPRegion:
290
+
UsageEndpoint=JPUsageEndpoint
291
+
ifFlags.AttachmentEndpoint=="" {
292
+
AttachmentEndpoint=JPAttachmentEndpoint
293
+
}
294
+
HaberdasherURL=JPHaberdasherURL
279
295
default:
280
296
UsageEndpoint=USUsageEndpoint
281
297
ifFlags.AttachmentEndpoint=="" {
@@ -373,6 +389,9 @@ func stringToRegion(region string) Region {
0 commit comments