Skip to main content

Module instance_catalog

Module instance_catalog 

Source
Expand description

Instance type catalog and selection algorithm for cloud compute infrastructure.

This module provides:

  • A static catalog of known instance types across AWS, GCP, and Azure
  • Resource quantity parsing (CPU strings, Kubernetes-style memory/storage quantities)
  • An algorithm to select the optimal instance type for a given workload

The catalog is the single source of truth for instance type specifications. It is used by the preflights system to automatically populate CapacityGroup.instance_type and CapacityGroup.profile based on the containers in a stack.

Structs§

CatalogGpu
Static GPU specification for catalog entries (no heap allocation).
InstanceSelection
Result of instance type selection.
InstanceTypeSpec
A known instance type with its hardware specifications.
WorkloadRequirements
Aggregated resource requirements from all containers in a capacity group.

Enums§

Architecture
CPU architecture.
InstanceFamily
Instance family classification.

Functions§

catalog_for_platform
Get all instance types for a given platform.
find_instance_type
Find a specific instance type by name and platform.
parse_cpu
Parse a CPU quantity string to f64.
parse_memory_bytes
Parse a memory or storage quantity string to bytes.
select_family
Select instance family based on workload characteristics.
select_instance_type
Select the best instance type for a workload on a given platform.