telemetry

package
v0.0.0-...-05f81da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RequiredBundle the bundle needed to use telemetry on the target
	RequiredBundle = "telemetrics"

	// Title is a predefined text to display on the Telemetry
	Title = `Enable Telemetry`
	// Help is a predefined text to display on the Telemetry
	// screen for interactive installations
	Help = `` /* 215-byte string literal not displayed */

	// TelemetryAboutURL is the URL to reference for telemetry details
	TelemetryAboutURL = `https://docs.01.org/clearlinux/guides/clear/telemetrics.html`

	// RequestNotice is a common text string to be displayed when enabling
	// telemetry by default on local networks
	RequestNotice = `NOTICE: Enabling Telemetry preferred by default on internal networks.`
)

Variables

View Source
var (
	// Policy is the default Telemetry policy to be displayed
	// during interactive installations. Overridden by command line or
	// configuration options
	Policy = "Intel's privacy policy can be found at: http://www.intel.com/privacy."

	// ProgVersion is the version of this Clear Installer set from the Model
	// since telemetry is a component of the model, can directly include the model here
	ProgVersion string
)

Functions

This section is empty.

Types

type Telemetry

type Telemetry struct {
	Enabled bool
	Defined bool
	URL     string
	TID     string
	// contains filtered or unexported fields
}

Telemetry represents the target system telemetry enabling flag

func (*Telemetry) CopyTelemetryRecords

func (tl *Telemetry) CopyTelemetryRecords(rootDir string) error

CopyTelemetryRecords copies the local spooled telemetry records to the target system to be uploaded when the target system is booted and telemetry is enabled.

func (*Telemetry) CreateTelemetryConf

func (tl *Telemetry) CreateTelemetryConf(rootDir string) error

CreateTelemetryConf create a custom Telemetry configuration file using the customer server and ID

func (*Telemetry) Installed

func (tl *Telemetry) Installed(rootDir string) bool

Installed returns true if telemetry tooling is present, false otherwise

func (*Telemetry) IsRequested

func (tl *Telemetry) IsRequested() bool

IsRequested returns true if we are requested telemetry be enabled

func (*Telemetry) IsUserDefined

func (tl *Telemetry) IsUserDefined() bool

IsUserDefined returns true if the configuration was interactively defined by the user

func (*Telemetry) IsUsingPrivateIP

func (tl *Telemetry) IsUsingPrivateIP() bool

IsUsingPrivateIP return true if the current image is resolving the Telemetry server to a Private network IP address

func (*Telemetry) LogRecord

func (tl *Telemetry) LogRecord(class string, severity int, payload string) error

LogRecord generates and saves a Telemetry record

func (*Telemetry) MarshalYAML

func (tl *Telemetry) MarshalYAML() (interface{}, error)

MarshalYAML marshals Telemetry into YAML format

func (*Telemetry) OptIn

func (tl *Telemetry) OptIn(rootDir string) error

OptIn runs the command to opt-in to telemetry when users accept to provide telemetry from crashes

func (*Telemetry) OptOut

func (tl *Telemetry) OptOut(rootDir string) error

OptOut runs the command to opt-out to telemetry when users do not agree to provide telemetry from crashes

func (*Telemetry) RunningEnvironment

func (tl *Telemetry) RunningEnvironment() string

RunningEnvironment returns the name of the hypervisor if running in a virtual machine, otherwise none

func (*Telemetry) SetEnable

func (tl *Telemetry) SetEnable(enable bool)

SetEnable sets the enabled flag and sets this is an user defined configuration

func (*Telemetry) SetRequested

func (tl *Telemetry) SetRequested(requested bool)

SetRequested set the Requested flag

func (*Telemetry) SetTelemetryServer

func (tl *Telemetry) SetTelemetryServer(telmURL string, telmID string, telmPolicy string) error

SetTelemetryServer set new defaults for the Telemetry server to override the built-in defaults

func (*Telemetry) SetUserDefined

func (tl *Telemetry) SetUserDefined(userDefined bool)

SetUserDefined set the user defined flag

func (*Telemetry) UnmarshalYAML

func (tl *Telemetry) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals Telemetry from YAML format

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL