Documentation
¶
Index ¶
- Constants
- type CostConfiguration
- func (c *CostConfiguration) Equals(config cloud.Config) bool
- func (c *CostConfiguration) Key() string
- func (c *CostConfiguration) Provider() string
- func (c *CostConfiguration) Sanitize() cloud.Config
- func (c *CostConfiguration) UnmarshalJSON(b []byte) error
- func (c *CostConfiguration) Validate() error
- type CostIntegration
- type STACKIT
- func (s *STACKIT) AllNodePricing() (interface{}, error)
- func (*STACKIT) ApplyReservedInstancePricing(map[string]*models.Node)
- func (s *STACKIT) ClusterInfo() (map[string]string, error)
- func (*STACKIT) ClusterManagementPricing() (string, float64, error)
- func (s *STACKIT) CombinedDiscountForNode(instanceType string, isPreemptible bool, ...) float64
- func (s *STACKIT) DownloadPricingData() error
- func (*STACKIT) GetAddresses() ([]byte, error)
- func (s *STACKIT) GetConfig() (*models.CustomPricing, error)
- func (*STACKIT) GetDisks() ([]byte, error)
- func (s *STACKIT) GetKey(l map[string]string, n *clustercache.Node) models.Key
- func (s *STACKIT) GetManagementPlatform() (string, error)
- func (*STACKIT) GetOrphanedResources() ([]models.OrphanedResource, error)
- func (s *STACKIT) GetPVKey(pv *clustercache.PersistentVolume, parameters map[string]string, ...) models.PVKey
- func (s *STACKIT) GpuPricing(nodeLabels map[string]string) (string, error)
- func (s *STACKIT) LoadBalancerPricing() (*models.LoadBalancer, error)
- func (s *STACKIT) NetworkPricing() (*models.Network, error)
- func (s *STACKIT) NodePricing(key models.Key) (*models.Node, models.PricingMetadata, error)
- func (s *STACKIT) PVPricing(pvk models.PVKey) (*models.PV, error)
- func (s *STACKIT) PricingSourceStatus() map[string]*models.PricingSource
- func (s *STACKIT) PricingSourceSummary() interface{}
- func (s *STACKIT) Regions() []string
- func (s *STACKIT) ServiceAccountStatus() *models.ServiceAccountStatus
- func (s *STACKIT) UpdateConfig(r io.Reader, updateType string) (*models.CustomPricing, error)
- func (s *STACKIT) UpdateConfigFromConfigMap(a map[string]string) (*models.CustomPricing, error)
Constants ¶
View Source
const (
StackitPIMPricingSource = "STACKIT PIM API Pricing"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostConfiguration ¶
type CostConfiguration struct {
CustomerAccountID string `json:"customerAccountId"`
ProjectID string `json:"projectId"`
ServiceAccountKeyPath string `json:"serviceAccountKeyPath,omitempty"`
}
CostConfiguration holds the configuration needed to connect to STACKIT Cost API
func (*CostConfiguration) Key ¶
func (c *CostConfiguration) Key() string
func (*CostConfiguration) Provider ¶
func (c *CostConfiguration) Provider() string
func (*CostConfiguration) Sanitize ¶
func (c *CostConfiguration) Sanitize() cloud.Config
func (*CostConfiguration) UnmarshalJSON ¶
func (c *CostConfiguration) UnmarshalJSON(b []byte) error
func (*CostConfiguration) Validate ¶
func (c *CostConfiguration) Validate() error
type CostIntegration ¶
type CostIntegration struct {
CostConfiguration
ConnectionStatus cloud.ConnectionStatus
}
func (*CostIntegration) GetCloudCost ¶
func (ci *CostIntegration) GetCloudCost(start time.Time, end time.Time) (*opencost.CloudCostSetRange, error)
func (*CostIntegration) GetStatus ¶
func (ci *CostIntegration) GetStatus() cloud.ConnectionStatus
func (*CostIntegration) RefreshStatus ¶
func (ci *CostIntegration) RefreshStatus() cloud.ConnectionStatus
type STACKIT ¶
type STACKIT struct {
Clientset clustercache.ClusterCache
Config models.ProviderConfig
ClusterRegion string
ClusterAccountID string
DownloadPricingDataLock sync.RWMutex
// contains filtered or unexported fields
}
func (*STACKIT) AllNodePricing ¶
func (*STACKIT) ApplyReservedInstancePricing ¶
func (*STACKIT) ClusterManagementPricing ¶
func (*STACKIT) CombinedDiscountForNode ¶
func (*STACKIT) DownloadPricingData ¶
func (*STACKIT) GetAddresses ¶
func (*STACKIT) GetManagementPlatform ¶
func (*STACKIT) GetOrphanedResources ¶
func (*STACKIT) GetOrphanedResources() ([]models.OrphanedResource, error)
func (*STACKIT) GetPVKey ¶
func (s *STACKIT) GetPVKey(pv *clustercache.PersistentVolume, parameters map[string]string, defaultRegion string) models.PVKey
func (*STACKIT) GpuPricing ¶
func (*STACKIT) LoadBalancerPricing ¶
func (s *STACKIT) LoadBalancerPricing() (*models.LoadBalancer, error)
func (*STACKIT) NodePricing ¶
func (*STACKIT) PricingSourceStatus ¶
func (s *STACKIT) PricingSourceStatus() map[string]*models.PricingSource
func (*STACKIT) PricingSourceSummary ¶
func (s *STACKIT) PricingSourceSummary() interface{}
func (*STACKIT) ServiceAccountStatus ¶
func (s *STACKIT) ServiceAccountStatus() *models.ServiceAccountStatus
func (*STACKIT) UpdateConfig ¶
func (*STACKIT) UpdateConfigFromConfigMap ¶
Click to show internal directories.
Click to hide internal directories.