fold sysinfo into network

the backends are network backends
This commit is contained in:
Girish Ramakrishnan
2023-08-03 13:38:42 +05:30
parent a4d57e7b08
commit 47d57a3971
23 changed files with 143 additions and 161 deletions

41
src/network/interface.js Normal file
View File

@@ -0,0 +1,41 @@
'use strict';
// -------------------------------------------
// This file just describes the interface
//
// New backends can start from here
// -------------------------------------------
exports = module.exports = {
getIPv4,
getIPv6,
testIPv4Config,
testIPv6Config
};
const assert = require('assert'),
BoxError = require('../boxerror.js');
async function getIPv4(config) {
assert.strictEqual(typeof config, 'object');
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'getIPv4 is not implemented');
}
async function getIPv6(config) {
assert.strictEqual(typeof config, 'object');
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'getIPv6 is not implemented');
}
async function testIPv4Config(config) {
assert.strictEqual(typeof config, 'object');
return null;
}
async function testIPv6Config(config) {
assert.strictEqual(typeof config, 'object');
return null;
}