power_sources

package
v0.0.0-...-12fafa4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

/usr/bin/true; exec /usr/bin/env go run "$0" "$@"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Battery

func Battery() *battery

Types

type NormalAlerter

type NormalAlerter struct {
	// contains filtered or unexported fields
}

func CreateNormalAlerter

func CreateNormalAlerter(initialStatus Status) *NormalAlerter

func (*NormalAlerter) Alerted

func (a *NormalAlerter) Alerted(status Status)

func (NormalAlerter) ShouldAlert

func (a NormalAlerter) ShouldAlert(logger *zap.Logger, newStatus *Status) (bool, string)

type Status

type Status struct {
	// contains filtered or unexported fields
}

func (Status) Charge

func (s Status) Charge() float64

func (Status) MarshalLogObject

func (s Status) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (Status) State

func (s Status) State() string

func (Status) String

func (s Status) String() string

func (Status) Time

func (s Status) Time() time.Time

Jump to

Keyboard shortcuts

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