Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchUsageData ¶
func FetchUsageData(ctx *settings.Session, project *engine.Workspace) (engine.ConsumptionMap, error)
FetchUsageData fetches usage estimates derived from cloud provider reported usage from the C3X Cloud Usage API for each supported resource in the project
func PopulateActualCosts ¶
PopulateActualCosts fetches cloud provider reported costs from the C3X Cloud Usage API and adds corresponding cost components to the project's resources
Types ¶
type RateLookup ¶
type RateLookup struct {
// contains filtered or unexported fields
}
RateLookup provides a thread-safe way to aggregate 'price not found' data. This is used to provide a summary of missing prices at the end of a run. It should be used as a singleton which is shared across the application.
func NewPriceFetcher ¶
func NewPriceFetcher(ctx *settings.Session, warnOnPriceErrors bool) *RateLookup
func (*RateLookup) LogWarnings ¶
func (p *RateLookup) LogWarnings()
LogWarnings writes the PriceFetcher prices to the application log. If the log level is above the debug level we also include resource names the log output.
func (*RateLookup) MissingPricesComponents ¶
func (p *RateLookup) MissingPricesComponents() []string
MissingPricesComponents returns a map of missing prices by component name, component names are in the format: resource_type.cost_component_name.
func (*RateLookup) MissingPricesLen ¶
func (p *RateLookup) MissingPricesLen() int
MissingPricesLen returns the number of missing prices.
func (*RateLookup) PopulatePrices ¶
func (p *RateLookup) PopulatePrices(project *engine.Workspace) error