Documentation
¶
Index ¶
- type Api
- func (api *Api) Do(req *http.Request) (*http.Response, error)
- func (api *Api) Get(path string) (*http.Response, error)
- func (api *Api) GetJson(path string, obj interface{}) error
- func (api *Api) GetMetrics() (string, error)
- func (api *Api) GetSensors() (*model.ServerSensorReadings, error)
- func (api *Api) GetSensorsRaw() (interface{}, error)
- func (api *Api) Login(username, password string) error
- func (api *Api) Logout() error
- func (api *Api) Name() string
- func (api *Api) NewRequest(method, path string, body io.Reader) (*http.Request, error)
- func (api *Api) PowerCommand(command int) error
- type PowerSuppliesResponse
- type PowerSupplyResponse
- type TemperatureSensorResponse
- type TemperatureSensorsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct { ServerAddr string // contains filtered or unexported fields }
func (*Api) GetMetrics ¶
func (*Api) GetSensors ¶
func (api *Api) GetSensors() (*model.ServerSensorReadings, error)
func (*Api) GetSensorsRaw ¶
func (*Api) NewRequest ¶
func (*Api) PowerCommand ¶
type PowerSuppliesResponse ¶
type PowerSuppliesResponse struct { PresentPowerReading int `json:"present_power_reading"` Supplies []PowerSupplyResponse `json:"supplies"` }
type PowerSupplyResponse ¶
type PowerSupplyResponse struct { Unhealthy int `json:"unhealthy"` Enabled int `json:"enabled"` Mismatch int `json:"mismatch"` PsBay int `json:"ps_bay"` PsPresent string `json:"ps_present"` PsCondition string `json:"ps_condition"` PsErrorCode string `json:"ps_error_code"` PsIpduCapable string `json:"ps_ipdu_capable"` PsHotplugCapable string `json:"ps_hotplug_capable"` PsModel string `json:"ps_model"` PsSpare string `json:"ps_spare"` PsSerialNum string `json:"ps_serial_num"` PsMaxCapWatts int `json:"ps_max_cap_watts"` PsFwVer string `json:"ps_fw_ver"` PsInputVolts int `json:"ps_input_volts"` PsOutputWatts int `json:"ps_output_watts"` Average int `json:"avg"` Max int `json:"max"` Supply bool `json:"supply"` Bbu bool `json:"bbu"` Charge int `json:"charge"` Age int `json:"age"` BatteryHealth int `json:"battery_health"` }
type TemperatureSensorResponse ¶
type TemperatureSensorResponse struct { Label string `json:"label"` XPosition int `json:"xposition"` YPosition int `json:"yposition"` Location string `json:"location"` Status string `json:"status"` CurrentReading int `json:"currentreading"` Caution int `json:"caution"` Critical int `json:"critical"` TempUnit string `json:"temp_unit"` }
type TemperatureSensorsResponse ¶
type TemperatureSensorsResponse struct { HostPowerState string `json:"hostpwr_state"` Temperatures []TemperatureSensorResponse `json:"temperature"` }
Click to show internal directories.
Click to hide internal directories.