client

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: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AKSKPair

type AKSKPair struct {
	AK string
	SK string
}

func ExtractAlibabaCloudAKSKPool

func ExtractAlibabaCloudAKSKPool() []AKSKPair

type AWSPriceClient

type AWSPriceClient struct {
	// contains filtered or unexported fields
}

func NewAWSPriceClient

func NewAWSPriceClient(globalAK, globalSK, cnAK, cnSK string, initialSpotUpdate bool) (*AWSPriceClient, error)

func (*AWSPriceClient) GetInstanceInfo added in v0.2.0

func (a *AWSPriceClient) GetInstanceInfo(instanceType string) *apis.InstanceInfo

func (*AWSPriceClient) GetInstancePrice

func (a *AWSPriceClient) GetInstancePrice(region, instanceType string) *apis.InstanceTypePrice

func (*AWSPriceClient) ListInstanceTypes added in v0.2.0

func (a *AWSPriceClient) ListInstanceTypes() []*Instance

func (*AWSPriceClient) ListInstancesPrice

func (a *AWSPriceClient) ListInstancesPrice(region string) *map[string]apis.RegionalInstancePrice

func (*AWSPriceClient) ListRegionsInstancesPrice

func (a *AWSPriceClient) ListRegionsInstancesPrice() map[string]*apis.RegionalInstancePrice

func (*AWSPriceClient) RefreshOnDemandPrice

func (a *AWSPriceClient) RefreshOnDemandPrice(region, instanceType string)

func (*AWSPriceClient) RefreshSavingsPlanPrice

func (a *AWSPriceClient) RefreshSavingsPlanPrice(region, instanceType string)

func (*AWSPriceClient) Run

func (a *AWSPriceClient) Run(ctx context.Context)

type AlibabaCloudPriceClient

type AlibabaCloudPriceClient struct {
	// contains filtered or unexported fields
}

func NewAlibabaCloudPriceClient

func NewAlibabaCloudPriceClient(akskPool []AKSKPair, initialSpotUpdate bool) (*AlibabaCloudPriceClient, error)

func (*AlibabaCloudPriceClient) GetInstancePrice

func (a *AlibabaCloudPriceClient) GetInstancePrice(region, instanceType string) *apis.InstanceTypePrice

func (*AlibabaCloudPriceClient) ListInstancesPrice

func (a *AlibabaCloudPriceClient) ListInstancesPrice(region string) *map[string]apis.RegionalInstancePrice

func (*AlibabaCloudPriceClient) ListRegionsInstancesPrice

func (a *AlibabaCloudPriceClient) ListRegionsInstancesPrice() map[string]*apis.RegionalInstancePrice

func (*AlibabaCloudPriceClient) RefreshOnDemandPrice

func (a *AlibabaCloudPriceClient) RefreshOnDemandPrice()

func (*AlibabaCloudPriceClient) Run

type ECSHoursPrice

type ECSHoursPrice struct {
	Price string `json:"price"`
}

type ECSPrice

type ECSPrice struct {
	PricingInfo map[string]ECSPriceDetail `json:"pricingInfo"`
}

type ECSPriceDetail

type ECSPriceDetail struct {
	Hours []ECSHoursPrice `json:"hours"`
}

type Instance added in v0.2.0

type Instance struct {
	Name string `json:"name"`
	apis.InstanceTypeMetadata
}

type PriceItem

type PriceItem struct {
	Product struct {
		Attributes struct {
			InstanceType      string `json:"instanceType"`
			PhysicalProcessor string `json:"physicalProcessor"`
			ClockSpeed        string `json:"clockSpeed"`
			VCPU              string `json:"vcpu"`
			Memory            string `json:"memory"`
			GPU               string `json:"gpu"`
		} `json:"attributes"`
	} `json:"product"`
	Terms struct {
		OnDemand map[string]struct {
			PriceDimensions map[string]struct {
				PricePerUnit map[string]string `json:"pricePerUnit"`
			} `json:"priceDimensions"`
		} `json:"onDemand"`
	} `json:"terms"`
}

type RegionalSpotInstancePrice

type RegionalSpotInstancePrice struct {
	Region        string                              `json:"region"`
	InstanceTypes *map[string]*apis.InstanceTypePrice `json:"instanceTypes"`
}

type RegionalSpotInstancePriceSplit

type RegionalSpotInstancePriceSplit struct {
	Region       string                  `json:"region"`
	InstanceType string                  `json:"instanceType"`
	Info         *apis.InstanceTypePrice `json:"info"`
}

Jump to

Keyboard shortcuts

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