优化结构
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package system
|
||||
|
||||
import "context"
|
||||
|
||||
type ServerDiskInfo struct {
|
||||
MountPoint string
|
||||
UsedMB uint64
|
||||
UsedGB uint64
|
||||
TotalMB uint64
|
||||
TotalGB uint64
|
||||
UsedPercent int
|
||||
}
|
||||
|
||||
type ServerInfo struct {
|
||||
GOOS string
|
||||
NumCPU int
|
||||
Compiler string
|
||||
GoVersion string
|
||||
NumGoroutine int
|
||||
CPUs []float64
|
||||
Cores int
|
||||
UsedMB uint64
|
||||
TotalMB uint64
|
||||
UsedPercent int
|
||||
Disk []ServerDiskInfo
|
||||
}
|
||||
|
||||
type SystemInfoProvider interface {
|
||||
Collect(context.Context, []string) (*ServerInfo, error)
|
||||
}
|
||||
Reference in New Issue
Block a user