consts.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package diagnostic
  2. import "time"
  3. const (
  4. defaultCollectorTimeout = time.Second * 10 // This const define the timeout value of a collector operation.
  5. collectorField = "collector" // used for logging purposes
  6. systemCollectorName = "system" // used for logging purposes
  7. tunnelStateCollectorName = "tunnelState" // used for logging purposes
  8. configurationCollectorName = "configuration" // used for logging purposes
  9. defaultTimeout = 15 * time.Second // timeout for the collectors
  10. twoWeeksOffset = -14 * 24 * time.Hour // maximum offset for the logs
  11. logFilename = "cloudflared_logs.txt" // name of the output log file
  12. configurationKeyUID = "uid" // Key used to set and get the UID value from the configuration map
  13. tailMaxNumberOfLines = "10000" // maximum number of log lines from a virtual runtime (docker or kubernetes)
  14. // Endpoints used by the diagnostic HTTP Client.
  15. cliConfigurationEndpoint = "/diag/configuration"
  16. tunnelStateEndpoint = "/diag/tunnel"
  17. systemInformationEndpoint = "/diag/system"
  18. memoryDumpEndpoint = "debug/pprof/heap"
  19. goroutineDumpEndpoint = "debug/pprof/goroutine"
  20. metricsEndpoint = "metrics"
  21. tunnelConfigurationEndpoint = "/config"
  22. // Base for filenames of the diagnostic procedure
  23. systemInformationBaseName = "systeminformation.json"
  24. metricsBaseName = "metrics.txt"
  25. zipName = "cloudflared-diag"
  26. heapPprofBaseName = "heap.pprof"
  27. goroutinePprofBaseName = "goroutine.pprof"
  28. networkBaseName = "network.json"
  29. rawNetworkBaseName = "raw-network.txt"
  30. tunnelStateBaseName = "tunnelstate.json"
  31. cliConfigurationBaseName = "cli-configuration.json"
  32. configurationBaseName = "configuration.json"
  33. taskResultBaseName = "task-result.json"
  34. )