owncast/controllers/admin/hardware.go
bitspill bfbac8cc57
Variable collisions; Possible use of nil value (#256)
* Variable '*' collides with imported package name

* Variable 'error' collides with builtin interface

* '*' may have 'nil' or other unexpected value as its corresponding error variable may be not 'nil'
2020-10-16 15:04:31 -07:00

17 lines
329 B
Go

package admin
import (
"encoding/json"
"net/http"
"github.com/owncast/owncast/metrics"
)
// GetHardwareStats will return hardware utilization over time
func GetHardwareStats(w http.ResponseWriter, r *http.Request) {
m := metrics.Metrics
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(m)
}