pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/system/sensors/sensors_darwin.go (about)

     1  // Package sensors provide methods for collecting sensors information
     2  package sensors
     3  
     4  // ////////////////////////////////////////////////////////////////////////////////// //
     5  //                                                                                    //
     6  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
     7  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     8  //                                                                                    //
     9  // ////////////////////////////////////////////////////////////////////////////////// //
    10  
    11  // ❗ Device contains info from different device sensors
    12  type Device struct {
    13  	Name        string
    14  	TempSensors []TempSensor
    15  }
    16  
    17  // ❗ TempSensor contains info from temperature sensor
    18  type TempSensor struct {
    19  	Name string
    20  	Cur  float64
    21  	Min  float64
    22  	Max  float64
    23  	Crit float64
    24  }
    25  
    26  // ////////////////////////////////////////////////////////////////////////////////// //
    27  
    28  // ❗ Collect collects sensors information
    29  func Collect() ([]*Device, error) {
    30  	panic("UNSUPPORTED")
    31  	return nil, nil
    32  }
    33  
    34  // ////////////////////////////////////////////////////////////////////////////////// //
    35  
    36  // ❗ Temperature returns min, max and average temperature
    37  func (d *Device) Temperature() (float64, float64, float64) {
    38  	panic("UNSUPPORTED")
    39  	return 0.0, 0.0, 0.0
    40  }
    41  
    42  // ❗ String formats sensor data as a string
    43  func (s TempSensor) String() string {
    44  	panic("UNSUPPORTED")
    45  	return ""
    46  }
    47  
    48  // ////////////////////////////////////////////////////////////////////////////////// //