telemetry

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Overview

Package telemetry collects hardware metrics and streams them to the Hub.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

Collector reads hardware metrics on a ticker and sends them via a callback.

func NewCollector

func NewCollector(sendFn func(protocol.TelemetryData)) *Collector

NewCollector creates a new telemetry collector. sendFn is called each tick with the collected metrics.

func (*Collector) IsRunning

func (c *Collector) IsRunning() bool

IsRunning returns true if the collector is currently active.

func (*Collector) SetSteamStatusFunc

func (c *Collector) SetSteamStatusFunc(fn SteamStatusFunc)

SetSteamStatusFunc sets the callback for reading Steam status.

func (*Collector) Start

func (c *Collector) Start(intervalSec int)

Start begins collecting metrics at the given interval (seconds). If already running, this is a no-op.

func (*Collector) Stop

func (c *Collector) Stop()

Stop halts the collection loop.

func (*Collector) UpdateInterval

func (c *Collector) UpdateInterval(intervalSec int)

UpdateInterval restarts the collector with a new interval.

type SteamStatusFunc

type SteamStatusFunc func() (running bool, gamingMode bool)

SteamStatusFunc returns Steam running state and gaming mode.

Jump to

Keyboard shortcuts

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