Documentation
¶
Rendered for windows/amd64
Index ¶
- Variables
- func CloseComputeSystem(system ComputeSystem)
- func CloseOperation(operation Operation)
- func EnumerateComputeSystems(query *uint16, operation Operation) error
- func GetComputeSystemProperties(system ComputeSystem, operation Operation, propertyQuery *uint16) error
- func WaitForOperationResult(operation Operation, timeout uint32) (string, error)
- func Win32FromHResult(hr uintptr) windows.Errno
- type ComputeSystem
- type MemoryStats
- type Operation
- type ProcessDetails
- type ProcessorStats
- type Properties
- type Statistics
- type StorageStats
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContainerQuery = utils.Must(windows.UTF16PtrFromString(`{"Types":["Container"]}`)) StatisticsQuery = utils.Must(windows.UTF16PtrFromString(`{"PropertyTypes":["Statistics"]}`)) )
View Source
var ( ErrEmptyResultDocument = errors.New("empty result document") ErrIDNotFound = windows.Errno(2151088398) )
Functions ¶
func CloseComputeSystem ¶
func CloseComputeSystem(system ComputeSystem)
CloseComputeSystem closes a handle to a compute system.
https://learn.microsoft.com/en-us/virtualization/api/hcs/reference/hcsclosecomputesystem
func EnumerateComputeSystems ¶
EnumerateComputeSystems enumerates compute systems.
https://learn.microsoft.com/en-us/virtualization/api/hcs/reference/hcsenumeratecomputesystems
func GetComputeSystemProperties ¶
func GetComputeSystemProperties(system ComputeSystem, operation Operation, propertyQuery *uint16) error
func WaitForOperationResult ¶
func Win32FromHResult ¶
Types ¶
type ComputeSystem ¶
func OpenComputeSystem ¶
func OpenComputeSystem(id string) (ComputeSystem, error)
OpenComputeSystem opens a handle to an existing compute system.
https://learn.microsoft.com/en-us/virtualization/api/hcs/reference/hcsopencomputesystem
type MemoryStats ¶
type Operation ¶
func CreateOperation ¶
CreateOperation creates a new operation.
type ProcessDetails ¶
type ProcessDetails struct {
ProcessId int32 `json:"ProcessId,omitempty"`
ImageName string `json:"ImageName,omitempty"`
CreateTimestamp time.Time `json:"CreateTimestamp,omitempty"`
UserTime100ns int32 `json:"UserTime100ns,omitempty"`
KernelTime100ns int32 `json:"KernelTime100ns,omitempty"`
MemoryCommitBytes int32 `json:"MemoryCommitBytes,omitempty"`
MemoryWorkingSetPrivateBytes int32 `json:"MemoryWorkingSetPrivateBytes,omitempty"`
}
type ProcessorStats ¶
type Properties ¶
type Properties struct {
ID string `json:"Id,omitempty"`
SystemType string `json:"SystemType,omitempty"`
Owner string `json:"Owner,omitempty"`
State string `json:"State,omitempty"`
Statistics *Statistics `json:"Statistics,omitempty"`
ProcessList []ProcessDetails `json:"ProcessList,omitempty"`
}
func GetContainers ¶
func GetContainers() ([]Properties, error)
type Statistics ¶
type Statistics struct {
Timestamp time.Time `json:"Timestamp,omitempty"`
ContainerStartTime time.Time `json:"ContainerStartTime,omitempty"`
Uptime100ns uint64 `json:"Uptime100ns,omitempty"`
Processor *ProcessorStats `json:"Processor,omitempty"`
Memory *MemoryStats `json:"Memory,omitempty"`
Storage *StorageStats `json:"Storage,omitempty"`
}
func GetContainerStatistics ¶
func GetContainerStatistics(containerID string) (Statistics, error)
Click to show internal directories.
Click to hide internal directories.