gl-store-s3.js/node_modules/aws-sdk/vendor/endpoint-cache/index.d.ts

28 lines
858 B
TypeScript
Raw Normal View History

2019-05-08 10:43:08 +00:00
/**
* Output shape for endpoint discovery operations
*/
export type DiscoveredEndpoints = Array<{Address?: string, CachePeriodInMinutes?: number}>
declare type EndpointRecords = Array<{
Address: string;
Expire: number;
}>;
export interface EndpointIdentifier {
[key: string]: string | undefined;
serviceId?: string;
region?: string;
accessKeyId?: string;
operation?: string;
}
export declare class EndpointCache {
readonly maxSize: number;
private cache;
constructor(maxSize?: number);
readonly size: number;
put(key: EndpointIdentifier | string, value: DiscoveredEndpoints): void;
get(key: EndpointIdentifier | string): EndpointRecords | undefined;
static getKeyString(key: EndpointIdentifier): string;
private populateValue;
empty(): void;
remove(key: EndpointIdentifier | string): void;
}