Documentation
¶
Index ¶
- type LinuxHardwareDriver
- func (d *LinuxHardwareDriver) EvaluateInterlock(metrics map[string]float64) (bool, error)
- func (d *LinuxHardwareDriver) ID() string
- func (d *LinuxHardwareDriver) Initialize(ctx context.Context, config map[string]any) error
- func (d *LinuxHardwareDriver) Name() string
- func (d *LinuxHardwareDriver) ReadCurrentTemperature() (float64, error)
- func (d *LinuxHardwareDriver) Shutdown(ctx context.Context) error
- type SubstrateDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinuxHardwareDriver ¶
type LinuxHardwareDriver struct {
// contains filtered or unexported fields
}
func NewLinuxHardwareDriver ¶
func NewLinuxHardwareDriver(maxTemp float64) *LinuxHardwareDriver
NewLinuxHardwareDriver initializes the driver targeting the primary CPU thermal zone.
func (*LinuxHardwareDriver) EvaluateInterlock ¶
func (d *LinuxHardwareDriver) EvaluateInterlock(metrics map[string]float64) (bool, error)
func (*LinuxHardwareDriver) ID ¶
func (d *LinuxHardwareDriver) ID() string
func (*LinuxHardwareDriver) Initialize ¶
Initialize now simply verifies that at least one thermal zone exists.
func (*LinuxHardwareDriver) Name ¶
func (d *LinuxHardwareDriver) Name() string
func (*LinuxHardwareDriver) ReadCurrentTemperature ¶
func (d *LinuxHardwareDriver) ReadCurrentTemperature() (float64, error)
ReadCurrentTemperature scans ALL thermal zones and returns the hottest valid one. This works on Intel, AMD Ryzen AI, ARM SBCs, Jetson, and heterogeneous hardware.
type SubstrateDriver ¶
type SubstrateDriver interface {
ID() string
Name() string
Initialize(ctx context.Context, config map[string]any) error
EvaluateInterlock(metrics map[string]float64) (bool, error) // Returns true if safety breached
Shutdown(ctx context.Context) error
}
SubstrateDriver defines the interface that all hardware modules (open-source or proprietary) must fulfill.
func LoadPlugin ¶
func LoadPlugin(path string) (SubstrateDriver, error)
LoadPlugin dynamically loads external binary plugins (.so files) at runtime.
Click to show internal directories.
Click to hide internal directories.