Bladeren bron

Rename Downloader.Run to .GetPricing

Signed-off-by: Christian Muirhead <christian.muirhead@microsoft.com>
Christian Muirhead 3 jaren geleden
bovenliggende
commit
4681301e46
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      pkg/cloud/azurepricesheet/downloader.go
  2. 1 1
      pkg/cloud/azureprovider.go

+ 1 - 1
pkg/cloud/azurepricesheet/downloader.go

@@ -29,7 +29,7 @@ type Downloader[T any] struct {
 	ConvertMeterInfo func(info commerce.MeterInfo) (map[string]*T, error)
 }
 
-func (d *Downloader[T]) Run(ctx context.Context) (map[string]*T, error) {
+func (d *Downloader[T]) GetPricing(ctx context.Context) (map[string]*T, error) {
 	log.Infof("requesting pricesheet download link")
 	url, err := d.getPricesheetDownloadURL(ctx)
 	if err != nil {

+ 1 - 1
pkg/cloud/azureprovider.go

@@ -889,7 +889,7 @@ func (az *Azure) DownloadPricingData() error {
 		// want to hang onto the lock while we're waiting for it.
 		go func() {
 			ctx := context.Background()
-			allPrices, err := downloader.Run(ctx)
+			allPrices, err := downloader.GetPricing(ctx)
 
 			az.DownloadPricingDataLock.Lock()
 			defer az.DownloadPricingDataLock.Unlock()