var Default … type Dir … // NewDir creates a new Dir encapsulating paths in the given dir. // // NewDir does not create any new directories or files--it merely encapsulates // the telemetry directory layout. func NewDir(dir string) Dir { … } func init() { … } func (d Dir) Dir() string { … } func (d Dir) LocalDir() string { … } func (d Dir) UploadDir() string { … } func (d Dir) DebugDir() string { … } func (d Dir) ModeFile() string { … } // SetMode updates the telemetry mode with the given mode. // Acceptable values for mode are "on", "off", or "local". // // SetMode always writes the mode file, and explicitly records the date at // which the modefile was updated. This means that calling SetMode with "on" // effectively resets the timeout before the next telemetry report is uploaded. func (d Dir) SetMode(mode string) error { … } // SetModeAsOf is like SetMode, but accepts an explicit time to use to // back-date the mode state. This exists only for testing purposes. func (d Dir) SetModeAsOf(mode string, asofTime time.Time) error { … } // Mode returns the current telemetry mode, as well as the time that the mode // was effective. // // If there is no effective time, the second result is the zero time. // // If Mode is "off", no data should be written to the telemetry directory, and // the other paths values referenced by Dir should be considered undefined. // This accounts for the case where initializing [Default] fails, and therefore // local telemetry paths are unknown. func (d Dir) Mode() (string, time.Time) { … } const DisabledOnPlatform …