Documentation
¶
Index ¶
- Constants
- func SelectOCICategory(service string) string
- type Authorizer
- 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 *clustercache.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 *clustercache.PersistentVolume, parameters map[string]string, _ string) models.PVKey
- func (o *Oracle) GpuPricing(nodeLabels map[string]string) (string, error)
- 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
- type RawConfigProvider
- func (ak *RawConfigProvider) CreateOCIConfig() (common.ConfigurationProvider, error)
- func (ak *RawConfigProvider) Equals(config cloud.Config) bool
- func (ak *RawConfigProvider) MarshalJSON() ([]byte, error)
- func (ak *RawConfigProvider) Sanitize() cloud.Config
- func (ak *RawConfigProvider) Validate() error
- type UsageApiConfiguration
- func (uac *UsageApiConfiguration) Equals(config cloud.Config) bool
- func (uac *UsageApiConfiguration) GetUsageApiClient() (*usageapi.UsageapiClient, error)
- func (uac *UsageApiConfiguration) Key() string
- func (uac *UsageApiConfiguration) Provider() string
- func (uac *UsageApiConfiguration) Sanitize() cloud.Config
- func (uac *UsageApiConfiguration) UnmarshalJSON(b []byte) error
- func (uac *UsageApiConfiguration) Validate() error
- type UsageApiIntegration
Constants ¶
View Source
const RawConfigProviderAuthorizerType = "OCIRawConfigProvider"
Variables ¶
This section is empty.
Functions ¶
func SelectOCICategory ¶ added in v1.112.0
Types ¶
type Authorizer ¶ added in v1.112.0
type Authorizer interface {
cloud.Authorizer
CreateOCIConfig() (common.ConfigurationProvider, error)
}
Authorizer provides which is used in when creating clients in the OCI SDK
func SelectAuthorizerByType ¶ added in v1.112.0
func SelectAuthorizerByType(typeStr string) (Authorizer, error)
SelectAuthorizerByType is an implementation of AuthorizerSelectorFn and acts as a register for Authorizer 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) GetPVKey ¶
func (o *Oracle) GetPVKey(pv *clustercache.PersistentVolume, parameters map[string]string, _ string) models.PVKey
func (*Oracle) GpuPricing ¶ added in v1.114.0
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
type RawConfigProvider ¶ added in v1.112.0
type RawConfigProvider struct {
TenancyID string `json:"tenancyID"`
UserID string `json:"userID"`
Region string `json:"region"`
Fingerprint string `json:"fingerprint"`
PrivateKey string `json:"privateKey"`
PrivateKeyPassphrase *string `json:"privateKeyPassphrase"`
}
RawConfigProvider holds OCI credentials and fulfils the common.ConfigurationProvider interface
func (*RawConfigProvider) CreateOCIConfig ¶ added in v1.112.0
func (ak *RawConfigProvider) CreateOCIConfig() (common.ConfigurationProvider, error)
func (*RawConfigProvider) Equals ¶ added in v1.112.0
func (ak *RawConfigProvider) Equals(config cloud.Config) bool
func (*RawConfigProvider) MarshalJSON ¶ added in v1.112.0
func (ak *RawConfigProvider) MarshalJSON() ([]byte, error)
MarshalJSON custom json marshalling functions, sets properties as tagged in struct and sets the authorizer type property
func (*RawConfigProvider) Sanitize ¶ added in v1.112.0
func (ak *RawConfigProvider) Sanitize() cloud.Config
func (*RawConfigProvider) Validate ¶ added in v1.112.0
func (ak *RawConfigProvider) Validate() error
type UsageApiConfiguration ¶ added in v1.112.0
type UsageApiConfiguration struct {
TenancyID string `json:"tenancyID"`
Region string `json:"region"`
Authorizer Authorizer `json:"authorizer"`
}
func (*UsageApiConfiguration) Equals ¶ added in v1.112.0
func (uac *UsageApiConfiguration) Equals(config cloud.Config) bool
func (*UsageApiConfiguration) GetUsageApiClient ¶ added in v1.112.0
func (uac *UsageApiConfiguration) GetUsageApiClient() (*usageapi.UsageapiClient, error)
func (*UsageApiConfiguration) Key ¶ added in v1.112.0
func (uac *UsageApiConfiguration) Key() string
func (*UsageApiConfiguration) Provider ¶ added in v1.112.0
func (uac *UsageApiConfiguration) Provider() string
func (*UsageApiConfiguration) Sanitize ¶ added in v1.112.0
func (uac *UsageApiConfiguration) Sanitize() cloud.Config
func (*UsageApiConfiguration) UnmarshalJSON ¶ added in v1.112.0
func (uac *UsageApiConfiguration) UnmarshalJSON(b []byte) error
func (*UsageApiConfiguration) Validate ¶ added in v1.112.0
func (uac *UsageApiConfiguration) Validate() error
type UsageApiIntegration ¶ added in v1.112.0
type UsageApiIntegration struct {
UsageApiConfiguration
ConnectionStatus cloud.ConnectionStatus
}
func (*UsageApiIntegration) GetCloudCost ¶ added in v1.112.0
func (uai *UsageApiIntegration) GetCloudCost(start time.Time, end time.Time) (*opencost.CloudCostSetRange, error)
func (*UsageApiIntegration) GetStatus ¶ added in v1.112.0
func (uai *UsageApiIntegration) GetStatus() cloud.ConnectionStatus
Click to show internal directories.
Click to hide internal directories.