bfbac8cc57
* 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'
17 lines
329 B
Go
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)
|
|
}
|