UNPKG

@cumulus/aws-client

Version:
31 lines 1.03 kB
import { ListObjectsV2Request, _Object } from '@aws-sdk/client-s3'; /** * Class to efficiently list all of the objects in an S3 bucket, without loading * them all into memory at once. Handles paging of listS3ObjectsV2 requests. */ declare class S3ListObjectsV2Queue { private readonly s3; private readonly params; private items; constructor(params: ListObjectsV2Request); /** * View the next item in the queue * * This does not remove the object from the queue. When there are no more * items in the queue, returns 'null'. * * @returns {Promise<Object>} an S3 object description */ peek(): Promise<_Object | null>; /** * Remove the next item from the queue * * When there are no more items in the queue, returns 'null'. * * @returns {Promise<Object>} an S3 object description */ shift(): Promise<_Object | null | undefined>; private fetchItems; } export = S3ListObjectsV2Queue; //# sourceMappingURL=S3ListObjectsV2Queue.d.ts.map