Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mode ¶
func Mode() string
Mode returns the current telemetry mode.
The telemetry mode is a global value that controls both the local collection and uploading of telemetry data. Possible mode values are:
- "on": both collection and uploading is enabled
- "local": collection is enabled, but uploading is disabled
- "off": both collection and uploading are disabled
When mode is "on", or "local", telemetry data is written to the local file system and may be inspected with the gotelemetry command.
If an error occurs while reading the telemetry mode from the file system, Mode returns the default value "local".
Types ¶
type CounterConfig ¶
type ProgramConfig ¶
type ProgramConfig struct { // the counter names may have to be // repeated for each program. (e.g., if the counters are in a package // that is used in more than one program.) Name string Versions []string // versions present in a counterconfig Counters []CounterConfig `json:",omitempty"` Stacks []CounterConfig `json:",omitempty"` }
type ProgramReport ¶
type Report ¶
type Report struct { Week string // first day this report covers (YYYY-MM-DD) LastWeek string // Week field from latest previous report uploaded X float64 // A random probability used to determine which counters are uploaded Programs []*ProgramReport Config string // version of UploadConfig used }
A Report is what's uploaded (or saved locally)
type UploadConfig ¶
type UploadConfig struct { GOOS []string GOARCH []string GoVersion []string SampleRate float64 Programs []*ProgramConfig }
An UploadConfig controls what data is uploaded.
Directories ¶
Path | Synopsis |
---|---|
Package counter implements a simple counter system for collecting totally public telemetry data.
|
Package counter implements a simple counter system for collecting totally public telemetry data. |
internal
|
|
config
package config provides methods for loading and querying a telemetry upload config file.
|
package config provides methods for loading and querying a telemetry upload config file. |
configstore
Package configstore abstracts interaction with the telemetry config server.
|
Package configstore abstracts interaction with the telemetry config server. |
counter
Package internal/counter implements the internals of the public counter package.
|
Package internal/counter implements the internals of the public counter package. |
mmap
The mmap package provides an abstraction for memory mapping files on different platforms.
|
The mmap package provides an abstraction for memory mapping files on different platforms. |
telemetry
Package telemetry manages the telemetry mode file.
|
Package telemetry manages the telemetry mode file. |
Click to show internal directories.
Click to hide internal directories.