Documentation ¶
Index ¶
- type DefaultPricing
- type Item
- type Oracle
- func (o *Oracle) AllNodePricing() (interface{}, error)
- func (o *Oracle) ApplyReservedInstancePricing(m map[string]*models.Node)
- func (o *Oracle) ClusterInfo() (map[string]string, error)
- func (o *Oracle) ClusterManagementPricing() (string, float64, error)
- func (o *Oracle) CombinedDiscountForNode(instanceType string, isPreemptible bool, ...) float64
- func (o *Oracle) DownloadPricingData() error
- func (o *Oracle) GetAddresses() ([]byte, error)
- func (o *Oracle) GetConfig() (*models.CustomPricing, error)
- func (o *Oracle) GetDisks() ([]byte, error)
- func (o *Oracle) GetKey(labels map[string]string, n *v1.Node) models.Key
- func (o *Oracle) GetLocalStorageQuery(duration time.Duration, duration2 time.Duration, b bool, b2 bool) string
- func (o *Oracle) GetManagementPlatform() (string, error)
- func (o *Oracle) GetOrphanedResources() ([]models.OrphanedResource, error)
- func (o *Oracle) GetPVKey(pv *v1.PersistentVolume, parameters map[string]string, _ string) models.PVKey
- func (o *Oracle) LoadBalancerPricing() (*models.LoadBalancer, error)
- func (o *Oracle) NetworkPricing() (*models.Network, error)
- func (o *Oracle) NodePricing(key models.Key) (*models.Node, models.PricingMetadata, error)
- func (o *Oracle) PVPricing(pvk models.PVKey) (*models.PV, error)
- func (o *Oracle) PricingSourceStatus() map[string]*models.PricingSource
- func (o *Oracle) PricingSourceSummary() interface{}
- func (o *Oracle) Regions() []string
- func (o *Oracle) ServiceAccountStatus() *models.ServiceAccountStatus
- func (o *Oracle) UpdateConfig(r io.Reader, _ string) (*models.CustomPricing, error)
- func (o *Oracle) UpdateConfigFromConfigMap(m map[string]string) (*models.CustomPricing, error)
- type Price
- type PricingResponse
- type Product
- type RateCardStore
- func (rcs *RateCardStore) ForEgressRegion(region string, defaultPricing DefaultPricing) (*models.Network, error)
- func (rcs *RateCardStore) ForKey(key models.Key, defaultPricing DefaultPricing) (*models.Node, models.PricingMetadata, error)
- func (rcs *RateCardStore) ForLB(defaultPricing DefaultPricing) (*models.LoadBalancer, error)
- func (rcs *RateCardStore) ForManagedCluster(clusterType string) float64
- func (rcs *RateCardStore) ForPVK(pvk models.PVKey, defaultPricing DefaultPricing) (*models.PV, error)
- func (rcs *RateCardStore) Refresh() (map[string]Price, error)
- func (rcs *RateCardStore) Store() map[string]Price
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPricing ¶
type DefaultPricing struct { OCPU string Memory string GPU string Storage string LB string Egress string }
func (DefaultPricing) TotalInstanceCost ¶
func (d DefaultPricing) TotalInstanceCost() (float64, error)
type Item ¶
type Item struct { PartNumber string `json:"partNumber"` DisplayName string `json:"displayName"` MetricName string `json:"metricName"` ServiceCategory string `json:"serviceCategory"` CurrencyCodeLocalizations []struct { CurrencyCode string `json:"currencyCode"` Prices []struct { Model string `json:"model"` Value float64 `json:"value"` } `json:"prices"` } `json:"currencyCodeLocalizations"` Description string `json:"description,omitempty"` }
type Oracle ¶
type Oracle struct { Config models.ProviderConfig Clientset clustercache.ClusterCache ClusterRegion string ClusterAccountID string DownloadPricingDataLock sync.RWMutex OSEnvLock sync.Mutex RateCardStore *RateCardStore ServiceAccountChecks *models.ServiceAccountChecks DefaultPricing DefaultPricing }
func (*Oracle) AllNodePricing ¶
func (*Oracle) ApplyReservedInstancePricing ¶
func (*Oracle) ClusterManagementPricing ¶
func (*Oracle) CombinedDiscountForNode ¶
func (*Oracle) DownloadPricingData ¶
DownloadPricingData refreshes the RateCardStore pricing data.
func (*Oracle) GetAddresses ¶
func (*Oracle) GetLocalStorageQuery ¶
func (*Oracle) GetManagementPlatform ¶
func (*Oracle) GetOrphanedResources ¶
func (o *Oracle) GetOrphanedResources() ([]models.OrphanedResource, error)
func (*Oracle) LoadBalancerPricing ¶
func (o *Oracle) LoadBalancerPricing() (*models.LoadBalancer, error)
func (*Oracle) NodePricing ¶
func (*Oracle) PricingSourceStatus ¶
func (o *Oracle) PricingSourceStatus() map[string]*models.PricingSource
func (*Oracle) PricingSourceSummary ¶
func (o *Oracle) PricingSourceSummary() interface{}
func (*Oracle) ServiceAccountStatus ¶
func (o *Oracle) ServiceAccountStatus() *models.ServiceAccountStatus
func (*Oracle) UpdateConfig ¶
func (*Oracle) UpdateConfigFromConfigMap ¶
type PricingResponse ¶
type PricingResponse struct {
Items []Item `json:"items"`
}
type RateCardStore ¶
type RateCardStore struct {
// contains filtered or unexported fields
}
func NewRateCardStore ¶
func NewRateCardStore(url, currencyCode string) *RateCardStore
func (*RateCardStore) ForEgressRegion ¶
func (rcs *RateCardStore) ForEgressRegion(region string, defaultPricing DefaultPricing) (*models.Network, error)
func (*RateCardStore) ForKey ¶
func (rcs *RateCardStore) ForKey(key models.Key, defaultPricing DefaultPricing) (*models.Node, models.PricingMetadata, error)
ForKey retrieves costing metadata for a key.
func (*RateCardStore) ForLB ¶
func (rcs *RateCardStore) ForLB(defaultPricing DefaultPricing) (*models.LoadBalancer, error)
func (*RateCardStore) ForManagedCluster ¶
func (rcs *RateCardStore) ForManagedCluster(clusterType string) float64
func (*RateCardStore) ForPVK ¶
func (rcs *RateCardStore) ForPVK(pvk models.PVKey, defaultPricing DefaultPricing) (*models.PV, error)
ForPVK retrieves a Gb/Hour cost for a given PVKey.
func (*RateCardStore) Store ¶
func (rcs *RateCardStore) Store() map[string]Price
Click to show internal directories.
Click to hide internal directories.