pricing

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func PopulateActualCosts(ctx *settings.Session, project *engine.Workspace) error

PopulateActualCosts fetches cloud provider reported costs from the C3X Cloud Usage API and adds corresponding cost components to the project's resources

func UploadCloudResourceIDs

func UploadCloudResourceIDs(ctx *settings.Session, project *engine.Workspace) error

UploadCloudResourceIDs sends the project scoped cloud resource ids to the Usage API, so they can be used to provide usage estimates.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL