UNPKG

@bitblit/ratchet-epsilon-common

Version:

Tiny adapter to simplify building API gateway Lambda APIS

24 lines (23 loc) 1.3 kB
import { GetQueueAttributesCommandOutput, SQSClient } from '@aws-sdk/client-sqs'; import { BackgroundEntry } from '../background-entry.js'; import { BackgroundAwsConfig } from '../../config/background/background-aws-config.js'; import { InternalBackgroundEntry } from '../internal-background-entry.js'; import { AbstractBackgroundManager } from './abstract-background-manager.js'; import { SNSClient } from '@aws-sdk/client-sns'; export declare class AwsSqsSnsBackgroundManager extends AbstractBackgroundManager { private _awsConfig; private _sqs; private _sns; constructor(_awsConfig: BackgroundAwsConfig, _sqs: SQSClient, _sns: SNSClient); readonly backgroundManagerName: string; get awsConfig(): BackgroundAwsConfig; get sqs(): SQSClient; get sns(): SNSClient; addEntryToQueue<T>(entry: BackgroundEntry<T>, fireStartMessage?: boolean): Promise<string>; fireImmediateProcessRequest<T>(entry: BackgroundEntry<T>): Promise<string>; fireStartProcessingRequest(): Promise<string>; fetchApproximateNumberOfQueueEntries(): Promise<number>; fetchCurrentQueueAttributes(): Promise<GetQueueAttributesCommandOutput>; writeMessageToSnsTopic(message: string): Promise<string>; takeEntryFromBackgroundQueue(): Promise<InternalBackgroundEntry<any>[]>; }