asyncify the vultr and DO backend

This commit is contained in:
Girish Ramakrishnan
2022-02-04 09:37:02 -08:00
parent bd4097098d
commit 856b23d940
6 changed files with 203 additions and 311 deletions
+6 -9
View File
@@ -29,39 +29,36 @@ function injectPrivateFields(newConfig, currentConfig) {
// in-place injection of tokens and api keys which came in with constants.SECRET_PLACEHOLDER
}
function upsert(domainObject, subdomain, type, values, callback) {
async function upsert(domainObject, subdomain, type, values) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert(Array.isArray(values));
assert.strictEqual(typeof callback, 'function');
// Result: none
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'upsert is not implemented'));
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'upsert is not implemented');
}
function get(domainObject, subdomain, type, callback) {
async function get(domainObject, subdomain, type) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert.strictEqual(typeof callback, 'function');
// Result: Array of matching DNS records in string format
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'get is not implemented'));
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'get is not implemented');
}
function del(domainObject, subdomain, type, values, callback) {
async function del(domainObject, subdomain, type, values) {
assert.strictEqual(typeof domainObject, 'object');
assert.strictEqual(typeof subdomain, 'string');
assert.strictEqual(typeof type, 'string');
assert(Array.isArray(values));
assert.strictEqual(typeof callback, 'function');
// Result: none
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'del is not implemented'));
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'del is not implemented');
}
async function wait(domainObject, subdomain, type, value, options) {