Documentation ¶
Index ¶
- Variables
- func NewSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, ...) (sensor.Sensor, error)
- type ComponentConfig
- type Config
- func (c *Config) Close(ctx context.Context) error
- func (c *Config) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
- func (c *Config) Ready(ctx context.Context, extra map[string]interface{}) (bool, error)
- func (c *Config) Reconfigure(ctx context.Context, _ resource.Dependencies, conf resource.Config) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDevicePathNotFound = errors.New("device path not found") ErrStatsNotAvailable = errors.New("stats not available for this device") )
View Source
var ( Model = resource.NewModel(utils.Namespace, "hwmonitor", "gpu_monitor") API = sensor.API PrettyName = "SBC GPU Monitor Sensor" Description = "A sensor that reports the GPU usage of an SBC" Version = utils.Version )
View Source
var (
ErrUnsupportedBoard = errors.New("gpu stats not supported on this board")
)
Functions ¶
Types ¶
type ComponentConfig ¶
type ComponentConfig struct {
SleepTimeMs int `json:"sleep_time_ms"`
}
Click to show internal directories.
Click to hide internal directories.