@mcma/aws-dynamodb
Version:
Node module with code for using DynamoDB as the backing data storage for MCMA API handlers and workers.
17 lines (16 loc) • 809 B
TypeScript
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
import { Logger } from "@mcma/core";
import { DynamoDbTableDescription } from "./dynamo-db-table-description";
import { DocumentDatabaseMutex, LockData } from "@mcma/data";
export declare class DynamoDbMutex extends DocumentDatabaseMutex {
private dc;
private tableDescription;
private readonly _versionId;
constructor(dc: DynamoDBDocumentClient, tableDescription: DynamoDbTableDescription, mutexName: string, mutexHolder: string, lockTimeout?: number, logger?: Logger);
protected get versionId(): string;
private generateTableKey;
private generateTableItem;
protected getLockData(): Promise<LockData>;
protected putLockData(): Promise<void>;
protected deleteLockData(versionId: string): Promise<void>;
}