Documentation
¶
Overview ¶
Package inventory owns inventory collection and sync state.
Index ¶
Constants ¶
View Source
const ( // DefaultRetryInterval is the delay after a failed inventory attempt. DefaultRetryInterval = 5 * time.Minute // DefaultStartupJitter is the maximum random delay before the first inventory attempt. DefaultStartupJitter = time.Minute )
Variables ¶
View Source
var ErrNotReady = errors.New("inventory backend not ready")
ErrNotReady indicates inventory export cannot proceed because backend state is not ready yet.
Functions ¶
func ComputeHash ¶
ComputeHash returns a deterministic hash for the stable inventory contents.
Types ¶
type AgentConfig ¶
type BlockDevice ¶
type DiskInfo ¶
type DiskInfo struct {
ContainerRootDisk string
BlockDevices []BlockDevice
}
type InventoryConfig ¶
type InventoryConfig struct {
Interval time.Duration
RetryInterval time.Duration
Timeout time.Duration
StartupJitter time.Duration
}
InventoryConfig controls periodic inventory scheduling.
type Manager ¶
type Manager interface {
Run(ctx context.Context) error
CollectOnce(ctx context.Context) (*Snapshot, error)
}
Manager coordinates periodic inventory collection into a store.
func NewManager ¶
func NewManager(source Source, sink Sink, cfg InventoryConfig) Manager
NewManager creates an inventory manager.
type MemoryInfo ¶
type MemoryInfo struct {
TotalBytes uint64
}
type NICInfo ¶
type NICInfo struct {
PrivateIPInterfaces []NICInterface
}
type NICInterface ¶
type Resources ¶
type Resources struct {
CPUInfo CPUInfo
MemoryInfo MemoryInfo
GPUInfo GPUInfo
DiskInfo DiskInfo
NICInfo NICInfo
}
type Snapshot ¶
type Snapshot struct {
CollectedAt time.Time
InventoryHash string
Hostname string
MachineID string
SystemUUID string
BootID string
Uptime time.Time
OperatingSystem string
OSImage string
KernelVersion string
AgentVersion string
GPUDriverVersion string
CUDAVersion string
DCGMVersion string
ContainerRuntimeVersion string
NetPrivateIP string
AgentConfig AgentConfig
Resources Resources
}
Snapshot is the agent-owned inventory state model.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mapper contains inventory payload mappers.
|
Package mapper contains inventory payload mappers. |
|
Package sink contains inventory sink implementations.
|
Package sink contains inventory sink implementations. |
|
Package source contains inventory collection adapters.
|
Package source contains inventory collection adapters. |
Click to show internal directories.
Click to hide internal directories.