forked from jaypipes/ghw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alias.go
106 lines (81 loc) · 2.17 KB
/
alias.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//
// Use and distribution licensed under the Apache license version 2.
//
// See the COPYING file in the root project directory for full text.
//
package ghw
import (
"github.com/jackmordaunt/ghw/pkg/baseboard"
"github.com/jackmordaunt/ghw/pkg/chassis"
"github.com/jackmordaunt/ghw/pkg/cpu"
"github.com/jackmordaunt/ghw/pkg/gpu"
"github.com/jackmordaunt/ghw/pkg/memory"
"github.com/jackmordaunt/ghw/pkg/option"
"github.com/jackmordaunt/ghw/pkg/pci"
pciaddress "github.com/jackmordaunt/ghw/pkg/pci/address"
"github.com/jackmordaunt/ghw/pkg/product"
"github.com/jackmordaunt/ghw/pkg/topology"
)
type WithOption = option.Option
var (
WithChroot = option.WithChroot
WithSnapshot = option.WithSnapshot
WithAlerter = option.WithAlerter
WithNullAlerter = option.WithNullAlerter
// match the existing environ variable to minimize surprises
WithDisableWarnings = option.WithNullAlerter
WithDisableTools = option.WithDisableTools
WithPathOverrides = option.WithPathOverrides
)
type SnapshotOptions = option.SnapshotOptions
type PathOverrides = option.PathOverrides
type CPUInfo = cpu.Info
var (
CPU = cpu.New
)
type MemoryArea = memory.Area
type MemoryInfo = memory.Info
type MemoryCacheType = memory.CacheType
type MemoryModule = memory.Module
const (
MEMORY_CACHE_TYPE_UNIFIED = memory.CACHE_TYPE_UNIFIED
MEMORY_CACHE_TYPE_INSTRUCTION = memory.CACHE_TYPE_INSTRUCTION
MEMORY_CACHE_TYPE_DATA = memory.CACHE_TYPE_DATA
)
var (
Memory = memory.New
)
type ChassisInfo = chassis.Info
var (
Chassis = chassis.New
)
type BaseboardInfo = baseboard.Info
var (
Baseboard = baseboard.New
)
type TopologyInfo = topology.Info
type TopologyNode = topology.Node
var (
Topology = topology.New
)
type Architecture = topology.Architecture
const (
ARCHITECTURE_SMP = topology.ARCHITECTURE_SMP
ARCHITECTURE_NUMA = topology.ARCHITECTURE_NUMA
)
type PCIInfo = pci.Info
type PCIAddress = pciaddress.Address
type PCIDevice = pci.Device
var (
PCI = pci.New
PCIAddressFromString = pciaddress.FromString
)
type ProductInfo = product.Info
var (
Product = product.New
)
type GPUInfo = gpu.Info
type GraphicsCard = gpu.GraphicsCard
var (
GPU = gpu.New
)