telemetry

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

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Record

func Record(ctx context.Context, client metadata.MDSClientInterface, d Data) error

Record records telemetry data.

Types

type Data

type Data struct {
	// Name of the agent.
	AgentName string
	// Version of the Agent.
	AgentVersion string
	// Architecture of the Agent.
	AgentArch string

	// OS name.
	OS string
	// The name the OS uses to fully describe itself.
	LongName string
	// OS name in short form (aka distro name).
	ShortName string
	// Version of the OS.
	Version string
	// Kernel Release.
	KernelRelease string
	// Kernel Version.
	KernelVersion string
}

Data is telemetry data on the current agent and OS.

type Job

type Job struct {
	// contains filtered or unexported fields
}

Job implements job scheduler interface for recording telemetry.

func New

func New(client metadata.MDSClientInterface, programName, agentVersion string) *Job

New initializes a new TelemetryJob.

func (*Job) ID

func (j *Job) ID() string

ID returns the ID for this job.

func (*Job) Interval

func (j *Job) Interval() (time.Duration, bool)

Interval returns the interval at which job is executed.

func (*Job) Run

func (j *Job) Run(ctx context.Context) (bool, error)

Run records telemetry data.

func (*Job) ShouldEnable

func (j *Job) ShouldEnable(ctx context.Context) bool

ShouldEnable returns true as long as DisableTelemetry is not set in metadata.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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