Documentation
¶
Index ¶
- func GetEnv() (*cel.Env, error)
- func SetUserAgent(inner http.RoundTripper, userAgent string, debug bool) http.RoundTripper
- type AddUserAgent
- type DatabaseVersion
- type GPUMap
- type GcpPriceList
- type InstanceData
- type InstanceMapper
- func (im *InstanceMapper) LoadAWSInstanceTypes(ctx context.Context, role string, debug bool) error
- func (im *InstanceMapper) LoadAWSRDSInstanceTypes(ctx context.Context, role string, rdsEngines []string, debug bool) error
- func (im *InstanceMapper) LoadAzureInstanceTypes(ctx context.Context, subscriptionId string, debug bool) error
- func (im *InstanceMapper) LoadGCPCloudSQLInstanceTypes(ctx context.Context, projectId string, sqlMap *SQLMap, debug bool) error
- func (im *InstanceMapper) LoadGCPInstanceTypes(ctx context.Context, projectId string, priceList *GcpPriceList, debug bool) error
- func (im *InstanceMapper) LoadGCPPriceList(fileName string) (*GcpPriceList, error)
- func (im *InstanceMapper) MapInstances(csvWriter *csv.Writer, source *map[string]map[string]InstanceType, ...) error
- type InstanceType
- func (it InstanceType) CSVHeaders(showPrices bool) []string
- func (it InstanceType) GetHourlyPrice(priceList *GcpPriceList) (float64, error)
- func (it InstanceType) String() string
- func (it InstanceType) ToCSV(showPrices bool, region string) []string
- func (it InstanceType) ToMap() *map[string]interface{}
- type MapError
- type MatcherLib
- type SQLMap
- type SQLMapItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetUserAgent ¶
func SetUserAgent(inner http.RoundTripper, userAgent string, debug bool) http.RoundTripper
Types ¶
type AddUserAgent ¶
type DatabaseVersion ¶
type GcpPriceList ¶
type InstanceData ¶
type InstanceData struct {
AwsInstances map[string]map[string]InstanceType `yaml:"aws"`
GcpInstances map[string]map[string]InstanceType `yaml:"gcp"`
AwsRdsInstances map[string]map[string]InstanceType `yaml:"aws_rds"`
GcpSqlInstances map[string]map[string]InstanceType `yaml:"gcp_sql"`
AzureInstances map[string]map[string]InstanceType `yaml:"azure"`
}
type InstanceMapper ¶
type InstanceMapper struct {
InstanceData InstanceData
}
func (*InstanceMapper) LoadAWSInstanceTypes ¶
func (*InstanceMapper) LoadAWSRDSInstanceTypes ¶
func (*InstanceMapper) LoadAzureInstanceTypes ¶
func (*InstanceMapper) LoadGCPCloudSQLInstanceTypes ¶
func (*InstanceMapper) LoadGCPInstanceTypes ¶
func (im *InstanceMapper) LoadGCPInstanceTypes(ctx context.Context, projectId string, priceList *GcpPriceList, debug bool) error
func (*InstanceMapper) LoadGCPPriceList ¶
func (im *InstanceMapper) LoadGCPPriceList(fileName string) (*GcpPriceList, error)
func (*InstanceMapper) MapInstances ¶
func (im *InstanceMapper) MapInstances(csvWriter *csv.Writer, source *map[string]map[string]InstanceType, target *map[string]map[string]InstanceType, matcher cel.Program, gpuMap GPUMap, priceListRegion string, numberOfResults int) error
type InstanceType ¶
type InstanceType struct {
InstanceTypeId string `yaml:"id"`
InstanceFamily string `yaml:"family"`
Region string `yaml:"region"`
Description string `yaml:"description,omitempty"`
BareMetal bool `yaml:"bare_metal,omitempty"`
GPUs int `yaml:"total_gpus,omitempty"`
GPUType string `yaml:"gpu_type,omitempty"`
GPUMemory int `yaml:"total_gpu_memory,omitempty"`
Memory int `yaml:"total_memory"`
VCPUs int `yaml:"total_vcpus"`
GHz float64 `yaml:"cpu_clockspeed"`
Bandwidth float64 `yaml:"network_bandwidth,omitempty"`
DatabaseType string `yaml:"db_type,omitempty"`
DatabaseMajorVersion string `yaml:"db_version_major,omitempty"`
DatabaseMinorVersion string `yaml:"db_version_minor,omitempty"`
DatabaseOriginal string `yaml:"db_original_type,omitempty"`
PricingPerRegion *map[string]float64 `yaml:"prices,omitempty"`
}
func (InstanceType) CSVHeaders ¶
func (it InstanceType) CSVHeaders(showPrices bool) []string
func (InstanceType) GetHourlyPrice ¶
func (it InstanceType) GetHourlyPrice(priceList *GcpPriceList) (float64, error)
func (InstanceType) String ¶
func (it InstanceType) String() string
func (InstanceType) ToMap ¶
func (it InstanceType) ToMap() *map[string]interface{}
type MatcherLib ¶
type MatcherLib struct{}
func (MatcherLib) CompileOptions ¶
func (MatcherLib) CompileOptions() []cel.EnvOption
func (MatcherLib) ProgramOptions ¶
func (MatcherLib) ProgramOptions() []cel.ProgramOption
type SQLMap ¶
type SQLMap struct {
Mapping map[string]SQLMapItem `yaml:"sql_mapping"`
}
type SQLMapItem ¶
Click to show internal directories.
Click to hide internal directories.