cpu_manager

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Model       = resource.NewModel("viam-soleng", "raspi", "cpu_manager")
	API         = sensor.API
	PrettyName  = "Raspberry Pi CPU Manager"
	Description = "A sensor that reports and manages the CPU configuration of the Raspberry Pi."
	Version     = utils.Version
)

Functions

func NewSensor

func NewSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, logger logging.Logger) (sensor.Sensor, error)

Types

type ComponentConfig

type ComponentConfig struct {
	Governor  string `json:"governor"`
	Frequency int    `json:"frequency"`
	Minimum   int    `json:"minimum"`
	Maximum   int    `json:"maximum"`
}

func (*ComponentConfig) Validate

func (conf *ComponentConfig) Validate(path string) ([]string, error)

type Config

type Config struct {
	resource.Named

	Governor  string
	Frequency int
	Minimum   int
	Maximum   int
	// contains filtered or unexported fields
}

func (*Config) Close

func (c *Config) Close(ctx context.Context) error

func (*Config) Readings

func (c *Config) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)

func (*Config) Ready

func (c *Config) Ready(ctx context.Context, extra map[string]interface{}) (bool, error)

func (*Config) Reconfigure

func (c *Config) Reconfigure(ctx context.Context, _ resource.Dependencies, conf resource.Config) error

Jump to

Keyboard shortcuts

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