Skip to content

Commit 7bd8676

Browse files
committed
TUN-8725: implement diagnostic procedure
## Summary Add a function that orchestrates the diagnostic jobs producing a zip file at the end. Closes TUN-8725
1 parent 451f98e commit 7bd8676

File tree

8 files changed

+457
-11
lines changed

8 files changed

+457
-11
lines changed

diagnostic/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (client *httpClient) SetBaseURL(baseURL *url.URL) {
3838

3939
func (client *httpClient) GET(ctx context.Context, endpoint string) (*http.Response, error) {
4040
if client.baseURL == nil {
41-
return nil, ErrNoBaseUrl
41+
return nil, ErrNoBaseURL
4242
}
4343
url := client.baseURL.JoinPath(endpoint)
4444

diagnostic/consts.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@ const (
2222
goroutineDumpEndpoint = "debug/pprof/goroutine"
2323
metricsEndpoint = "metrics"
2424
tunnelConfigurationEndpoint = "/config"
25+
// Base for filenames of the diagnostic procedure
26+
systemInformationBaseName = "systeminformation.json"
27+
metricsBaseName = "metrics.txt"
28+
zipName = "cloudflared-diag"
29+
heapPprofBaseName = "heap.pprof"
30+
goroutinePprofBaseName = "goroutine.pprof"
31+
networkBaseName = "network.json"
32+
tunnelStateBaseName = "tunnelstate.json"
2533
)

0 commit comments

Comments
 (0)