@cloud-carbon-footprint/core
Version:
The core logic to get cloud usage data and estimate energy and carbon emissions.
24 lines (23 loc) • 1.26 kB
TypeScript
import { Cost } from '../cost';
import { CloudConstants, CloudConstantsEmissionsFactors, IFootprintEstimator, FootprintEstimate, ICloudService } from '../.';
import { StorageUsage } from '.';
export default abstract class StorageService implements ICloudService {
estimator: IFootprintEstimator;
protected constructor(storageCoefficient: number);
getEstimates(start: Date, end: Date, region: string, emissionsFactors: CloudConstantsEmissionsFactors, constants: CloudConstants): Promise<FootprintEstimate[]>;
abstract getUsage(start: Date, end: Date, region: string): Promise<StorageUsage[]>;
abstract getCosts(start: Date, end: Date, region: string): Promise<Cost[]>;
abstract serviceName: string;
}
export declare abstract class SSDStorageService extends StorageService {
coefficient: number;
protected constructor(coefficient: number);
abstract getUsage(start: Date, end: Date, region: string): Promise<StorageUsage[]>;
abstract serviceName: string;
}
export declare abstract class HDDStorageService extends StorageService {
coefficient: number;
protected constructor(coefficient: number);
abstract getUsage(start: Date, end: Date, region: string): Promise<StorageUsage[]>;
abstract serviceName: string;
}