Documentation
¶
Overview ¶
* GPU instance data is from:https://instances.vantage.sh/ ,Thanks a lot!
Index ¶
- func SetTflopsMap(gpuInfos *[]config.GpuInfo)
- type GPUNodeInstanceInfoAndPrice
- type PricingProvider
- type StaticPricingProvider
- func (p *StaticPricingProvider) GetGPUNodeInstanceTypeInfo(region string) ([]types.GPUNodeInstanceInfo, bool)
- func (p *StaticPricingProvider) GetGPUNodeInstanceTypeInfoByInstance(instanceType string, region string) ([]types.GPUNodeInstanceInfo, bool)
- func (p *StaticPricingProvider) GetPringcing(instanceType string, capacityType types.CapacityTypeEnum) (float64, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTflopsMap ¶
Types ¶
type GPUNodeInstanceInfoAndPrice ¶
type GPUNodeInstanceInfoAndPrice struct {
GPUNodeInstanceInfo types.GPUNodeInstanceInfo
// contains filtered or unexported fields
}
type PricingProvider ¶
type PricingProvider interface {
GetPringcing(instanceType, capacityType types.CapacityTypeEnum) (float64, bool)
GetGPUNodeInstanceTypeInfo(region string) ([]string, bool)
}
PricingProvider provides pricing information and calculations for instance types
type StaticPricingProvider ¶
type StaticPricingProvider struct{}
StaticPricingProvider implements PricingProvider using static pricing data Data is now stored in global variables and initialized during package init
func NewStaticPricingProvider ¶
func NewStaticPricingProvider() *StaticPricingProvider
func (*StaticPricingProvider) GetGPUNodeInstanceTypeInfo ¶
func (p *StaticPricingProvider) GetGPUNodeInstanceTypeInfo(region string) ([]types.GPUNodeInstanceInfo, bool)
GetGPUNodeInstanceTypeInfo implements PricingProvider interface
func (*StaticPricingProvider) GetGPUNodeInstanceTypeInfoByInstance ¶
func (p *StaticPricingProvider) GetGPUNodeInstanceTypeInfoByInstance(instanceType string, region string) ([]types.GPUNodeInstanceInfo, bool)
GetGPUNodeInstanceTypeInfoByInstance gets the gpu info for the instanceType, region
func (*StaticPricingProvider) GetPringcing ¶
func (p *StaticPricingProvider) GetPringcing(instanceType string, capacityType types.CapacityTypeEnum) (float64, bool)
GetPringcing gets the pricing for the instanceType, capacityType
Click to show internal directories.
Click to hide internal directories.