Master API, Admin UI, Go media-node, Docker/Dokploy deploy configs. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
295 B
Go
15 lines
295 B
Go
//go:build !windows
|
|
|
|
package health
|
|
|
|
import "syscall"
|
|
|
|
func diskStat(path string) (total, free uint64) {
|
|
var st syscall.Statfs_t
|
|
if err := syscall.Statfs(path, &st); err != nil {
|
|
return 0, 0
|
|
}
|
|
total = st.Blocks * uint64(st.Bsize)
|
|
free = st.Bavail * uint64(st.Bsize)
|
|
return total, free
|
|
}
|