Documentation ¶
Index ¶
Constants ¶
View Source
const ( SortAscending = "ascending" SortAsc = "asc" SortDescending = "descending" SortDesc = "desc" GPUCountField = "gpus" InferenceAcceleratorsField = "inference-accelerators" VCPUs = "vcpus" Memory = "memory" GPUMemoryTotal = "gpu-memory-total" NetworkInterfaces = "network-interfaces" SpotPrice = "spot-price" ODPrice = "on-demand-price" InstanceStorage = "instance-storage" EBSOptimizedBaselineBandwidth = "ebs-optimized-baseline-bandwidth" EBSOptimizedBaselineThroughput = "ebs-optimized-baseline-throughput" EBSOptimizedBaselineIOPS = "ebs-optimized-baseline-iops" )
Variables ¶
This section is empty.
Functions ¶
func Sort ¶
func Sort(instanceTypes []*instancetypes.Details, sortField string, sortDirection string) ([]*instancetypes.Details, error)
Sort sorts the given instance types by the given field in the given direction
sortField is a json path to a field in the instancetypes.Details struct which represents the field to sort instance types by (Ex: ".MemoryInfo.SizeInMiB"). Quantity flags present in the CLI (memory, gpus, etc.) are also accepted.
sortDirection represents the direction to sort in. Valid options: "ascending", "asc", "descending", "desc".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.