Documentation
¶
Overview ¶
Package nutclient provides a simple client for connecting to UPS NUT daemon
Index ¶
- type Client
- func (c *Client) Auth(login string, password string) error
- func (c *Client) BatteryCharge() (int, error)
- func (c *Client) BatteryChargeLow() (int, error)
- func (c *Client) BatteryChargeRestart() (int, error)
- func (c *Client) BatteryChargeWarning() (int, error)
- func (c *Client) BatteryRuntime() (int, error)
- func (c *Client) BatteryRuntimeLow() (int, error)
- func (c *Client) BatteryRuntimeRestart() (int, error)
- func (c *Client) Close() error
- func (c *Client) GetData(format string) (string, error)
- func (c *Client) GetServerInfo() (string, error)
- func (c *Client) GetServerUpsList() ([]string, error)
- func (c *Client) GetServerVersion() (string, error)
- func (c *Client) GetUpsModel() (string, error)
- func (c *Client) GetUpsSerial() (string, error)
- func (c *Client) GetUpsVars() ([]string, error)
- func (c *Client) InputCurrent() (int, error)
- func (c *Client) InputFrequency() (int, error)
- func (c *Client) InputVoltage() (int, error)
- func (c *Client) IsLowBattery() (bool, error)
- func (c *Client) IsOnBattery() (bool, error)
- func (c *Client) IsOnline() (bool, error)
- func (c *Client) Login(upsName string) error
- func (c *Client) Logout() error
- func (c *Client) OutputCurrent() (int, error)
- func (c *Client) OutputFrequency() (int, error)
- func (c *Client) OutputVoltage() (int, error)
- func (c *Client) StartTLS(configtls *tls.Config) error
- func (c *Client) UpsActivePower() (int, error)
- func (c *Client) UpsApparentPower() (int, error)
- func (c *Client) UpsLoad() (int, error)
- func (c *Client) UpsTemperature() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
A Client represents a client connection to a nut server.
func (*Client) BatteryChargeLow ¶
Return Battery Charge Low value
func (*Client) BatteryChargeRestart ¶
Return Battery Charge Restart value
func (*Client) BatteryChargeWarning ¶
Return Battery Charge Warning value
func (*Client) BatteryRuntime ¶
Return Battery runtime (seconds)
func (*Client) BatteryRuntimeLow ¶
Return Battery runtime low (seconds)
func (*Client) BatteryRuntimeRestart ¶
Return Battery runtime restart (seconds)
func (*Client) GetServerUpsList ¶ added in v1.0.1
Return configured UPS list
func (*Client) GetServerVersion ¶
Return Server Version
func (*Client) GetUpsSerial ¶
Return Ups Serial Number
func (*Client) GetUpsVars ¶ added in v1.0.1
Return ups vars avaible
func (*Client) InputFrequency ¶
Return Input Frequency (Hz)
func (*Client) IsLowBattery ¶
Return true if current ups status is low battery
func (*Client) IsOnBattery ¶
Return true if current ups is on battery
func (*Client) OutputCurrent ¶
Return Output Current (A)
func (*Client) OutputFrequency ¶
Return Output Frequency (Hz)
func (*Client) OutputVoltage ¶
Return Output Voltage (V)
func (*Client) StartTLS ¶
StartTLS sends the STARTTLS command and encrypts all further communication.
func (*Client) UpsActivePower ¶
Return current active ups power (W)
func (*Client) UpsApparentPower ¶
Return current apparent ups power (VA)
func (*Client) UpsTemperature ¶
Return ups load (degrees C)