mirror of
https://github.com/owncast/owncast.git
synced 2024-11-26 23:24:29 +03:00
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'
16 lines
329 B
Go
16 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)
|
|
}
|