fold sysinfo into network
the backends are network backends
This commit is contained in:
41
src/network/interface.js
Normal file
41
src/network/interface.js
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user