import { GoalInvocation } from "../../api/goal/GoalInvocation";
import { CacheConfiguration } from "../../api/machine/SoftwareDeliveryMachineOptions";
import { GoalCacheArchiveStore } from "../../core/goal/cache/CompressingGoalCache";
export interface S3CacheConfiguration extends CacheConfiguration {
    cache?: {
        /**
         * AWS S3 bucket to perist cache entries to.  If
         * not provided, it defaults to
         * "sdm-WORKSPACE_ID-SDM_NAME-goal-cache", with "WORKSPACE_ID"
         * replaced with your Atomist workspace ID and "SDM_NAME"
         * replaced with the name of the running SDM, converting
         * letters to lower case and removing all characters that are
         * not letters, numbers, and dashes (-).  It makes no attempt
         * to create this bucket, so make sure it exists before trying
         * to use it.
         */
        bucket?: string;
        /** Set to true to enable goal input/output caching */
        enabled?: boolean;
        /** Path prefix, defaults to "goal-cache". */
        path?: string;
        /** AWS region for cache bucket. */
        region?: string;
    };
}
export declare type CacheConfig = Required<Pick<Required<S3CacheConfiguration>["cache"], "bucket" | "path">> & {
    region?: string;
};
/**
 * Goal archive store that stores the compressed archives in a AWS
 * S3 bucket.  All failures are caught and logged.  If
 * retrieval fails, the error is rethrown so the cache-miss listeners
 * will be invoked.
 */
export declare class S3GoalCacheArchiveStore implements GoalCacheArchiveStore {
    store(gi: GoalInvocation, classifier: string, archivePath: string): Promise<string>;
    delete(gi: GoalInvocation, classifier: string): Promise<void>;
    retrieve(gi: GoalInvocation, classifier: string, targetArchivePath: string): Promise<void>;
    private awsS3;
}
/** Construct object path for cache configuration and classifier. */
export declare function getCachePath(cacheConfig: CacheConfig, classifier?: string): string;
/**
 * Retrieve cache configuration and populate with default values.
 */
export declare function getCacheConfig(gi: GoalInvocation): CacheConfig;
//# sourceMappingURL=cache.d.ts.map