forked from channl/dynamodb-lambda-autoscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProvisionerBase.js
30 lines (25 loc) · 972 Bytes
/
ProvisionerBase.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* @flow */
/* eslint-disable no-unused-vars */
import { invariant } from '../Global';
import type { TableDescription, UpdateTableRequest } from 'aws-sdk-promise';
import type { TableConsumedCapacityDescription } from '../flow/FlowTypes';
import DynamoDB from '../aws/DynamoDB';
import CloudWatch from '../aws/CloudWatch';
export default class ProvisionerBase {
db: DynamoDB;
constructor() {
this.db = DynamoDB.create(this.getDynamoDBRegion());
}
getDynamoDBRegion(): string {
invariant(false, 'The method \'getDynamoDBRegion\' was not implemented');
}
async getTableNamesAsync(): Promise<string[]> {
invariant(false, 'The method \'getTableNamesAsync\' was not implemented');
}
async getTableUpdateAsync(
tableDescription: TableDescription,
tableConsumedCapacityDescription: TableConsumedCapacityDescription):
Promise<?UpdateTableRequest> {
invariant(false, 'The method \'getTableUpdateAsync\' was not implemented');
}
}