apis

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	AWSPriceClientContextKey     = "aws"
	AlibabaCloudClientContextKey = "alibabacloud"

	AWSGlobalAKEnv = "AWS_GLOBAL_ACCESS_KEY"
	AWSGlobalSKEnv = "AWS_GLOBAL_SECRET_KEY"
	AWSCNAKEnv     = "AWS_CN_ACCESS_KEY"
	AWSCNSKEnv     = "AWS_CN_SECRET_KEY"

	AlibabaCloudAKSKPoolEnv = "ALIBABACLOUD_AKSK_POOL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSEC2Billing

type AWSEC2Billing struct {
	Rate float64 `json:"rate"`
}

type AWSEC2SPPaymentOption

type AWSEC2SPPaymentOption string
const (
	AWSEC2SPPaymentOptionAllUpfront     AWSEC2SPPaymentOption = "all"
	AWSEC2SPPaymentOptionPartialUpfront AWSEC2SPPaymentOption = "partial"
	AWSEC2SPPaymentOptionNoUpfront      AWSEC2SPPaymentOption = "no"
)

type GPUInfo added in v0.2.0

type GPUInfo struct {
	GPUModel          string  `json:"gpu_model"`
	ComputeCapability float64 `json:"compute_capability"`
	GPUCount          int     `json:"gpu_count"`
	CUDACores         int     `json:"cuda_cores"`
	GPUMemory         int     `json:"gpu_memory"`
}

GPUInfo the struct of `aws_instance_gpu.json` The content source of the JSON data: https://github.com/vantage-sh/ec2instances.info/blob/ac77935005ba75c0b95f6dcb5b5308163794147e/scrape.py#L524 We need to update the JSON manual if the AWS add new gpu instance.

type InstanceInfo added in v0.2.0

type InstanceInfo struct {
	InstanceTypeMetadata
	RegionsSet sets.Set[string] `json:"-"`
	Regions    []string         `json:"regions"`
	GPU        *GPUInfo         `json:"gpu,omitempty"`
}

type InstanceTypeMetadata added in v0.2.0

type InstanceTypeMetadata struct {
	Arch              string  `json:"arch"`
	PhysicalProcessor string  `json:"physical_processor"`
	ClockSpeed        float64 `json:"clock_speed"`
	VCPU              float64 `json:"vcpu"`
	Memory            float64 `json:"memory"`
	GPU               float64 `json:"gpu"`
}

type InstanceTypePrice

type InstanceTypePrice struct {
	InstanceTypeMetadata
	Zones                []string `json:"zones"`
	OnDemandPricePerHour float64  `json:"onDemandPricePerHour"`
	// AWSEC2Billing represents the cost of saving plan billing
	// key is {savings plan type}/{term length}/{payment option}
	AWSEC2Billing map[string]AWSEC2Billing `json:"awsEC2Billing,omitempty"`
	// SpotPricePerHour represents the smallest spot price per hour in different zones
	SpotPricePerHour map[string]float64 `json:"spotPricePerHour,omitempty"`
}

func (*InstanceTypePrice) DeepCopy

func (i *InstanceTypePrice) DeepCopy() *InstanceTypePrice

type RegionTypeKey

type RegionTypeKey struct {
	Region       string
	InstanceType string
}

type RegionalInstancePrice

type RegionalInstancePrice struct {
	InstanceTypePrices map[string]*InstanceTypePrice `json:"instanceTypePrices"`
}

func (*RegionalInstancePrice) DeepCopy

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL