Documentation
¶
Overview ¶
Copyright © 2020 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2020 Andrew Mobbs ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func HealthHandler ¶
func HealthHandler(w http.ResponseWriter, r *http.Request)
HealthHandler returns a health status object See https://github.com/droboports/droboports.github.io/wiki/NASD-XML-format
func StatusHandler ¶
func StatusHandler(w http.ResponseWriter, r *http.Request)
StatusHandler returns the full Drobo status object as JSON
Types ¶
type Monitor ¶
type Monitor struct { HaveGoodStatus bool LastGoodFetchTime time.Time LastFetchTime time.Time LastGoodStatus Status LastFetchError error }
Monitor holds overall state of the drobomon server process
type Slot ¶
type Slot struct { XMLName xml.Name `xml:,any` SlotNumber int `xml:"mSlotNumber"` Status int `xml:"mStatus"` DiskState int `xml:"mDiskState"` ErrorCount int `xml:"mErrorCount"` Make string `xml:"mMake"` DiskFwRev string `xml:"mDiskFwRev"` Serial string `xml:"mSerial"` PhyCapacity int64 `xml:"mPhysicalCapacity"` RotSpeed int `xml:"RotationalSpeed"` }
Slot hold data about a single drive slot in a Drobo NAS
type Status ¶
type Status struct { Serial string `xml:"mSerial"` Name string `xml:"mName"` Version string `xml:"mVersion"` TotalCapacity int64 `xml:"mTotalCapacityProtected"` UsedCapacity int64 `xml:"mUsedCapacityProtected"` FreeCapacity int64 `xml:"mFreeCapacityProtected"` DNASStatus int `xml:"DNASStatus"` Status int `xml:"mStatus"` Slots struct { Slots []Slot `xml:",any"` } `xml:"mSlotsExp"` }
Status holds the status structure of a Drobo NAS