mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
common[all]: add internal
This commit is contained in:
parent
72109c3d21
commit
7288e9a5af
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
package cpu
|
package cpu
|
||||||
|
|
||||||
import "github.com/shirou/gopsutil/common"
|
import "github.com/shirou/gopsutil/internal/common"
|
||||||
|
|
||||||
func perCPUTimes() ([]CPUTimesStat, error) {
|
func perCPUTimes() ([]CPUTimesStat, error) {
|
||||||
return []CPUTimesStat{}, common.NotImplementedError
|
return []CPUTimesStat{}, common.NotImplementedError
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// sys/resource.h
|
// sys/resource.h
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/StackExchange/wmi"
|
"github.com/StackExchange/wmi"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Win32_Processor struct {
|
type Win32_Processor struct {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DiskPartitions(all bool) ([]DiskPartitionStat, error) {
|
func DiskPartitions(all bool) ([]DiskPartitionStat, error) {
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/StackExchange/wmi"
|
"github.com/StackExchange/wmi"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func HostInfo() (*HostInfoStat, error) {
|
func HostInfo() (*HostInfoStat, error) {
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/StackExchange/wmi"
|
"github.com/StackExchange/wmi"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
process "github.com/shirou/gopsutil/common/process"
|
process "github.com/shirou/gopsutil/process"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,7 +5,7 @@ package load
|
|||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadAvg() (*LoadAvgStat, error) {
|
func LoadAvg() (*LoadAvgStat, error) {
|
||||||
|
@ -5,7 +5,7 @@ package load
|
|||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadAvg() (*LoadAvgStat, error) {
|
func LoadAvg() (*LoadAvgStat, error) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
package load
|
package load
|
||||||
|
|
||||||
import (
|
import (
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func LoadAvg() (*LoadAvgStat, error) {
|
func LoadAvg() (*LoadAvgStat, error) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPageSize() (uint64, error) {
|
func getPageSize() (uint64, error) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func VirtualMemory() (*VirtualMemoryStat, error) {
|
func VirtualMemory() (*VirtualMemoryStat, error) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// example of netstat -idbn output on yosemite
|
// example of netstat -idbn output on yosemite
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
"github.com/shirou/gopsutil/cpu"
|
"github.com/shirou/gopsutil/cpu"
|
||||||
"github.com/shirou/gopsutil/net"
|
"github.com/shirou/gopsutil/net"
|
||||||
)
|
)
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/shirou/gopsutil/cpu"
|
||||||
net "github.com/shirou/gopsutil/net"
|
net "github.com/shirou/gopsutil/net"
|
||||||
)
|
)
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/StackExchange/wmi"
|
"github.com/StackExchange/wmi"
|
||||||
"github.com/shirou/w32"
|
"github.com/shirou/w32"
|
||||||
|
|
||||||
common "github.com/shirou/gopsutil/common"
|
"github.com/shirou/gopsutil/internal/common"
|
||||||
cpu "github.com/shirou/gopsutil/cpu"
|
cpu "github.com/shirou/gopsutil/cpu"
|
||||||
net "github.com/shirou/gopsutil/net"
|
net "github.com/shirou/gopsutil/net"
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user