implemented first version of the modular IPC system

This commit is contained in:
2025-11-17 18:00:04 +01:00
parent 4b72568ad3
commit 4dc53b9d5f
5 changed files with 149 additions and 18 deletions
@@ -0,0 +1,16 @@
module.exports = {
name:"module-handler", // Unique name for our function that will later be used to get the function from the map via "mapFunctions.get("example").function()"
async function(module,parameter){
return new Promise(async (resolve, reject) => {
if(mapFunctions.get(module) == undefined){
reject("requested modules not found")
return
}
mapFunctions.get(module).function(parameter).then((result) => {
resolve(result)
}).catch((err) => {
reject(err)
});
})
}
}