Documentation ¶
Index ¶
- Variables
- type DefaultFanController
- func (f *DefaultFanController) GetFanId() string
- func (f *DefaultFanController) GetStatistics() FanControllerStatistics
- func (f *DefaultFanController) Run(ctx context.Context) error
- func (f *DefaultFanController) RunInitializationSequence() (err error)
- func (f *DefaultFanController) UpdateFanSpeed() error
- type FanController
- type FanControllerStatistics
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFanStalledAtMaxPwm = errors.New("fan stalled at max pwm")
)
View Source
var InitializationSequenceMutex sync.Mutex
Functions ¶
This section is empty.
Types ¶
type DefaultFanController ¶
type DefaultFanController struct {
// contains filtered or unexported fields
}
func (*DefaultFanController) GetFanId ¶
func (f *DefaultFanController) GetFanId() string
func (*DefaultFanController) GetStatistics ¶
func (f *DefaultFanController) GetStatistics() FanControllerStatistics
func (*DefaultFanController) RunInitializationSequence ¶
func (f *DefaultFanController) RunInitializationSequence() (err error)
func (*DefaultFanController) UpdateFanSpeed ¶
func (f *DefaultFanController) UpdateFanSpeed() error
type FanController ¶
type FanController interface { // Run starts the control loop Run(ctx context.Context) error GetFanId() string GetStatistics() FanControllerStatistics // RunInitializationSequence for the given fan to determine its characteristics RunInitializationSequence() (err error) UpdateFanSpeed() error }
func NewFanController ¶
func NewFanController( persistence persistence.Persistence, fan fans.Fan, controlLoop control_loop.ControlLoop, updateRate time.Duration, ) FanController
type FanControllerStatistics ¶
Click to show internal directories.
Click to hide internal directories.