ups

package
v0.0.0-...-1b0f67f Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2017, 2024 Juan B. Rodriguez * Copyright 2017, Derek Macias. * Copyright 2005-2016, Lime Technology * Copyright 2015, Dan Landon. * Copyright 2015, Bergware International. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.

Index

Constants

View Source
const (
	Green  = "green"
	Red    = "red"
	Orange = "orange"
)

Green -

Variables

This section is empty.

Functions

This section is empty.

Types

type Apc

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

Apc - apcupsd

func NewApc

func NewApc() *Apc

NewApc -

func (*Apc) GetStatus

func (a *Apc) GetStatus() []dto.Sample

GetStatus -

func (*Apc) Parse

func (a *Apc) Parse(lines []string) []dto.Sample

Parse -

type Kind

type Kind int

Kind -

const (
	DNE Kind = iota // does not exist
	APC
	NUT
	USB_HID // USB HID UPS devices
	SNMP    // SNMP-based UPS devices
)

DNE -

func IdentifyUps

func IdentifyUps() (Kind, error)

IdentifyUps - Enhanced UPS detection with support for multiple UPS types

type NoUps

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

NoUps -

func NewNoUps

func NewNoUps() *NoUps

NewNoUps -

func (*NoUps) GetStatus

func (n *NoUps) GetStatus() []dto.Sample

GetStatus -

type Nut

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

Nut -

func NewNut

func NewNut() *Nut

NewNut -

func (*Nut) GetStatus

func (n *Nut) GetStatus() []dto.Sample

GetStatus -

func (*Nut) Parse

func (n *Nut) Parse(lines []string) []dto.Sample

Parse -

type Ups

type Ups interface {
	GetStatus() []dto.Sample
}

Ups -

Jump to

Keyboard shortcuts

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