Versions in this module Expand all Collapse all v0 v0.12.0 Jul 10, 2023 v0.11.0 May 12, 2023 v0.10.0 Feb 6, 2023 v0.9.0 Mar 25, 2022 Changes in this version + var WithAlerter = option.WithAlerter + var WithNullAlerter = option.WithNullAlerter + var WithPathOverrides = option.WithPathOverrides + type MemoryArea = memory.Area + type PathOverrides = option.PathOverrides v0.8.0 May 12, 2021 Changes in this version + var WithDisableTools = option.WithDisableTools v0.7.0 Feb 2, 2021 Changes in this version + var WithAlterter = option.WithAlerter + var WithDisableWarnings = option.WithNullAlerter + var WithNullAlterter = option.WithNullAlerter + var WithSnapshot = option.WithSnapshot type HostInfo + PCI *pci.Info + type SnapshotOptions = option.SnapshotOptions v0.6.1 May 23, 2020 v0.6.0 Mar 17, 2020 Changes in this version type Disk + IsRemovable bool type MemoryInfo + Modules []*MemoryModule + type MemoryModule struct + Label string + Location string + SerialNumber string + SizeBytes int64 + Vendor string v0.5.0 Dec 5, 2019 Changes in this version + const UNKNOWN + var EB = PB * 1024 + var GB = MB * 1024 + var KB int64 = 1024 + var MB = KB * 1024 + var PB = TB * 1024 + var TB = GB * 1024 + func DiskBusPath(disk string) string — js/wasm, linux/amd64, windows/amd64 + func DiskModel(disk string) string — js/wasm, linux/amd64, windows/amd64 + func DiskNUMANodeID(disk string) int — js/wasm, linux/amd64, windows/amd64 + func DiskPhysicalBlockSizeBytes(disk string) uint64 — js/wasm, linux/amd64, windows/amd64 + func DiskSerialNumber(disk string) string — js/wasm, linux/amd64, windows/amd64 + func DiskSizeBytes(disk string) uint64 — js/wasm, linux/amd64, windows/amd64 + func DiskVendor(disk string) string — js/wasm, linux/amd64, windows/amd64 + func DiskWWN(disk string) string — js/wasm, linux/amd64, windows/amd64 + func PartitionInfo(part string) (string, string, bool) — js/wasm, linux/amd64, windows/amd64 + func PartitionIsReadOnly(part string) bool — js/wasm, linux/amd64, windows/amd64 + func PartitionMountPoint(part string) string — js/wasm, linux/amd64, windows/amd64 + func PartitionSizeBytes(part string) uint64 — js/wasm, linux/amd64, windows/amd64 + func PartitionType(part string) string — js/wasm, linux/amd64, windows/amd64 + type Architecture int + const ARCHITECTURE_NUMA + const ARCHITECTURE_SMP + func (a Architecture) MarshalJSON() ([]byte, error) + func (a Architecture) String() string + type BIOSInfo struct + Date string + Vendor string + Version string + func BIOS(opts ...*WithOption) (*BIOSInfo, error) + func (i *BIOSInfo) String() string + func (info *BIOSInfo) JSONString(indent bool) string + func (info *BIOSInfo) YAMLString() string + type BaseboardInfo struct + AssetTag string + SerialNumber string + Vendor string + Version string + func Baseboard(opts ...*WithOption) (*BaseboardInfo, error) + func (i *BaseboardInfo) String() string + func (info *BaseboardInfo) JSONString(indent bool) string + func (info *BaseboardInfo) YAMLString() string + type BlockInfo struct + Disks []*Disk + Partitions []*Partition + TotalPhysicalBytes uint64 + func Block(opts ...*WithOption) (*BlockInfo, error) + func (i *BlockInfo) JSONString(indent bool) string + func (i *BlockInfo) String() string + func (i *BlockInfo) YAMLString() string + type BusType int + const BUS_TYPE_IDE + const BUS_TYPE_NVME + const BUS_TYPE_PCI + const BUS_TYPE_SCSI + const BUS_TYPE_UNKNOWN + const BUS_TYPE_VIRTIO + func (bt BusType) MarshalJSON() ([]byte, error) + func (bt BusType) String() string + type CPUInfo struct + Processors []*Processor + TotalCores uint32 + TotalThreads uint32 + func CPU(opts ...*WithOption) (*CPUInfo, error) + func (i *CPUInfo) JSONString(indent bool) string + func (i *CPUInfo) String() string + func (i *CPUInfo) YAMLString() string + type ChassisInfo struct + AssetTag string + SerialNumber string + Type string + TypeDescription string + Vendor string + Version string + func Chassis(opts ...*WithOption) (*ChassisInfo, error) + func (i *ChassisInfo) String() string + func (info *ChassisInfo) JSONString(indent bool) string + func (info *ChassisInfo) YAMLString() string + type Disk struct + BusPath string + BusType BusType + DriveType DriveType + Model string + NUMANodeID int + Name string + Partitions []*Partition + PhysicalBlockSizeBytes uint64 + SerialNumber string + SizeBytes uint64 + StorageController StorageController + Vendor string + WWN string + func Disks() []*Disk + func (d *Disk) String() string + type DriveType int + const DRIVE_TYPE_FDD + const DRIVE_TYPE_HDD + const DRIVE_TYPE_ODD + const DRIVE_TYPE_SSD + const DRIVE_TYPE_UNKNOWN + func (dt DriveType) MarshalJSON() ([]byte, error) + func (dt DriveType) String() string + type GPUInfo struct + GraphicsCards []*GraphicsCard + func GPU(opts ...*WithOption) (*GPUInfo, error) + func (i *GPUInfo) JSONString(indent bool) string + func (i *GPUInfo) String() string + func (i *GPUInfo) YAMLString() string + type GraphicsCard struct + Address string + DeviceInfo *PCIDevice + Index int + Node *TopologyNode + func (card *GraphicsCard) String() string + type HostInfo struct + BIOS *BIOSInfo + Baseboard *BaseboardInfo + Block *BlockInfo + CPU *CPUInfo + Chassis *ChassisInfo + GPU *GPUInfo + Memory *MemoryInfo + Network *NetworkInfo + Product *ProductInfo + Topology *TopologyInfo + func Host(opts ...*WithOption) (*HostInfo, error) + func (i *HostInfo) JSONString(indent bool) string + func (i *HostInfo) YAMLString() string + func (info *HostInfo) String() string + type MemoryCache struct + Level uint8 + LogicalProcessors []uint32 + SizeBytes uint64 + Type MemoryCacheType + func (c *MemoryCache) String() string + type MemoryCacheType int + const MEMORY_CACHE_TYPE_DATA + const MEMORY_CACHE_TYPE_INSTRUCTION + const MEMORY_CACHE_TYPE_UNIFIED + func (a MemoryCacheType) MarshalJSON() ([]byte, error) + func (a MemoryCacheType) String() string + type MemoryInfo struct + SupportedPageSizes []uint64 + TotalPhysicalBytes int64 + TotalUsableBytes int64 + func Memory(opts ...*WithOption) (*MemoryInfo, error) + func (i *MemoryInfo) JSONString(indent bool) string + func (i *MemoryInfo) String() string + func (i *MemoryInfo) YAMLString() string + type NIC struct + Capabilities []*NICCapability + IsVirtual bool + MacAddress string + Name string + func NICs() []*NIC + func (n *NIC) String() string + type NICCapability struct + CanEnable bool + IsEnabled bool + Name string + type NetworkInfo struct + NICs []*NIC + func Network(opts ...*WithOption) (*NetworkInfo, error) + func (i *NetworkInfo) JSONString(indent bool) string + func (i *NetworkInfo) String() string + func (i *NetworkInfo) YAMLString() string + type PCIAddress struct + Bus string + Domain string + Function string + Slot string + func PCIAddressFromString(address string) *PCIAddress + type PCIDevice struct + Address string + Class *pcidb.Class + Product *pcidb.Product + ProgrammingInterface *pcidb.ProgrammingInterface + Subclass *pcidb.Subclass + Subsystem *pcidb.Product + Vendor *pcidb.Vendor + func (di *PCIDevice) String() string + func (pd *PCIDevice) MarshalJSON() ([]byte, error) + type PCIInfo struct + Classes map[string]*pcidb.Class + Products map[string]*pcidb.Product + Vendors map[string]*pcidb.Vendor + func PCI(opts ...*WithOption) (*PCIInfo, error) + func (info *PCIInfo) GetDevice(address string) *PCIDevice + func (info *PCIInfo) ListDevices() []*PCIDevice + type Partition struct + Disk *Disk + IsReadOnly bool + Label string + MountPoint string + Name string + SizeBytes uint64 + Type string + func DiskPartitions(disk string) []*Partition + func (p *Partition) String() string + type Processor struct + Capabilities []string + Cores []*ProcessorCore + ID int + Id int + Model string + NumCores uint32 + NumThreads uint32 + Vendor string + func Processors() []*Processor + func (p *Processor) HasCapability(find string) bool + func (p *Processor) String() string + type ProcessorCore struct + ID int + Id int + Index int + LogicalProcessors []int + NumThreads uint32 + func (c *ProcessorCore) String() string + type ProductInfo struct + Family string + Name string + SKU string + SerialNumber string + UUID string + Vendor string + Version string + func Product(opts ...*WithOption) (*ProductInfo, error) + func (i *ProductInfo) String() string + func (info *ProductInfo) JSONString(indent bool) string + func (info *ProductInfo) YAMLString() string + type SortByLogicalProcessorId []uint32 + func (a SortByLogicalProcessorId) Len() int + func (a SortByLogicalProcessorId) Less(i, j int) bool + func (a SortByLogicalProcessorId) Swap(i, j int) + type SortByMemoryCacheLevelTypeFirstProcessor []*MemoryCache + func (a SortByMemoryCacheLevelTypeFirstProcessor) Len() int + func (a SortByMemoryCacheLevelTypeFirstProcessor) Less(i, j int) bool + func (a SortByMemoryCacheLevelTypeFirstProcessor) Swap(i, j int) + type StorageController int + const STORAGE_CONTROLLER_IDE + const STORAGE_CONTROLLER_MMC + const STORAGE_CONTROLLER_NVME + const STORAGE_CONTROLLER_SCSI + const STORAGE_CONTROLLER_UNKNOWN + const STORAGE_CONTROLLER_VIRTIO + func (sc StorageController) MarshalJSON() ([]byte, error) + func (sc StorageController) String() string + type TopologyInfo struct + Architecture Architecture + Nodes []*TopologyNode + func Topology(opts ...*WithOption) (*TopologyInfo, error) + func (i *TopologyInfo) JSONString(indent bool) string + func (i *TopologyInfo) String() string + func (i *TopologyInfo) YAMLString() string + type TopologyNode struct + Caches []*MemoryCache + Cores []*ProcessorCore + ID int + Id int + func TopologyNodes() ([]*TopologyNode, error) + func (n *TopologyNode) String() string + type WithOption struct + Chroot *string + func WithChroot(dir string) *WithOption