Versions in this module Expand all Collapse all v0 v0.6.0 Nov 8, 2023 Changes in this version + const DataTransfer + const MBInGB + const ScannerInstance + const ScannerRootVolume + const SecondsInAMonth + const SecondsInAnHour + const Snapshot + const VolumeFromSnapshot + var FamilyScanDurationsMap = map[familiestypes.FamilyType]*common.LogarithmicFormula + type EstimateAssetScanParams struct + Asset *models.Asset + AssetScanTemplate *models.AssetScanTemplate + DestRegion string + FromSnapshotVolumeType ec2types.VolumeType + JobCreationTimeSec int64 + ScannerInstanceType ec2types.InstanceType + ScannerRootVolumeSizeGB int64 + ScannerVolumeType ec2types.VolumeType + SourceRegion string + Stats models.AssetScanStats + type MarketOption string + const MarketOptionOnDemand + const MarketOptionSpot + type PriceFetcher interface + GetDataTransferCostPerGB func(sourceRegion, destRegion string) (float64, error) + GetInstancePerHourCost func(ctx context.Context, regionCode string, instanceType ec2types.InstanceType, ...) (float64, error) + GetSnapshotMonthlyCostPerGB func(ctx context.Context, regionCode string) (float64, error) + GetVolumeMonthlyCostPerGB func(ctx context.Context, regionCode string, volumeType ec2types.VolumeType) (float64, error) + type PriceFetcherImpl struct + func (o *PriceFetcherImpl) GetDataTransferCostPerGB(sourceRegion, destRegion string) (float64, error) + func (o *PriceFetcherImpl) GetInstancePerHourCost(ctx context.Context, regionCode string, instanceType ec2types.InstanceType, ...) (float64, error) + func (o *PriceFetcherImpl) GetSnapshotMonthlyCostPerGB(ctx context.Context, regionCode string) (float64, error) + func (o *PriceFetcherImpl) GetVolumeMonthlyCostPerGB(ctx context.Context, regionCode string, volumeType ec2types.VolumeType) (float64, error) + type ScanEstimator struct + func New(pricingClient *pricing.Client, ec2Client *ec2.Client) *ScanEstimator + func (s *ScanEstimator) EstimateAssetScan(ctx context.Context, params EstimateAssetScanParams) (*models.Estimation, error)